Make a entity that attak you

I need help to make a entity how attac you, if it see you

Hi @Fynito-b7836caa-e4b0-497f-99cb-7c7d71d90827,

The AI system in Lumberyard has many features and doing something like making an entity that attacks you can be as simple as a gun turret that just tracks the player and shoots or an animated enemy entity that works with a team of of enemies to hunt the player. I recommend you download the Legacy Game Sample project and see how the grunt entity uses the AI system to attack a player it can see.

Some additional info:

To detect a player using the AI system you can enable the vision sensory model . More on the sensory models here:

http://docs.aws.amazon.com/lumberyard/latest/developerguide/ai-concepts-sensory-models.html

Make sure that your player and your AI are assigned different factions:

http://docs.aws.amazon.com/lumberyard/latest/developerguide/ai-concepts-example-group-factions.html

More info about setting up factions here:

http://docs.aws.amazon.com/lumberyard/latest/developerguide/ai-scripting-factions.html

Use the modular behavior trees to dictate the AI state to react to the sensory input and move in range of the player and attack.

http://docs.aws.amazon.com/lumberyard/latest/developerguide/ai-scripting-mbt.html

Of course attacking has all sorts of implications - is it ranged, melee, raycast weapon or a projectile like a grenade or rocket etc. Again I recommend looking at the grunt class and lua files from the Legacy Game Sample to see how it is set up.

https://aws.amazon.com/lumberyard/downloads/