I know that AC is not designed for combat. I really want some sort of action/tension in my first person 3d game. Would any of the following be possible without coding?
1} Enemy NPC that chases the enemy that results in death, or punishes player in some way. Maybe dragging player to begining of level. In this scenario, it would be nice if the player could hide, like in a box, so that the enemy NPC would move away.
2} Any form of combat, if not gun, then a punching mechanism? Perhaps the player can chase an enemy NPC. If you are within it's hitbox area and press punch, it will play a death animation and switch into a corpse model/mesh.
If you anyone is aware of the game Baldi's Basic, it has a range of enemy NPCs that serve different functions. And, I'm really open to any kind of action/suspense mechanism and that is why I'm being a little vague.
Like if someone knows how to incorporated something similar but different, I would be very excited to learn how. Thank you ahead of time.
Comments
Welcome to the community, @nixonlee.
In the case of an NPC chasing the Player, you can attach a large Trigger to the NPC that causes them to start chasing the Player once they enter. This can be done with the Character: NPC Follow Action, with an "Exit" Trigger similarly set up to stop following when the Player goes too far away.
If you want to have a line of sight mechanic, swap the On Enter Trigger with a Continuous one, and have it begin with a Physics: Raycast Action between the Player and the NPC's eyes to check there's nothing in between.
To have the NPC perform some attach animation or such when they get too close, you can use another, smaller, Trigger in front of them that plays a Character: Animate Action.
Another technique is to instead use these Triggers to affect Variables attached to the NPC, which a continuously-running "Logic" ActionList then reads. This can be done by adding the "ActionList Starter" component to the NPC and having it run a background ActionList that loops back on itself when complete.
If the Player "dies", you can use the Engine: End game Action to restart the game, or reset the scene.
Player attacks would be a bit more involved as they'd require use of Active Inputs, which allow you to run ActionLists when a specific input is pressed. But, I'd recommend starting with Enemy NPCs first.
A bit of a disclaimer: as you've noted, AC isn't intended for this kind of gameplay so it might take a bit of tweaking to get something that feels decent. Once you've got something though, I'd recommend looking into the use of ActionList assets, and ActionList parameters, so that you can re-use this logic among other NPCs and prefabs.
With this working, I think I can ditch the Player attack mechanic. Though I will play around with it to see what works.
Adventure Creator really is amazing for non-coders. Thank you! Life saver.
On this topic, some kind Adventure Creator NPC visual state machine using AC's actions would be amazing, you can already kind of see it with action list assets referencing each other, but doing anything complex will soon become messy that way, and can be difficult to get around the Constant ID system.
AI assets on the store such as Emerald, Blaze etc are good at what they do, but very limited, and getting AC talking with them is an issue.
The more open-ended "professional" assets such as Behaviour Designer obviously have the potential, but have a steep learning curve and again, getting AC working directly with can be problematic, depending on what you're wanting to do of course.
So yeah, maybe not a priority but I'm sure a lot of people would benefit from something like that, AC's non-coder friendly nature of actions being written in plain english and having easy to check and manipulate variables make it second to none for me.
What is it about the dedicated AI assets that you consider "very limited"? As in, in how they can affect AC?
When it comes to new features, I always prefer to consider a typical use-case and work backwards. Do you have a specific scenario in mind where this would help?