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:

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

More info about setting up factions here:

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.

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.