In the blender game engine, how do I make an animal change it's condition from walking to attacking when it sees the player?

  • $\begingroup$ It seems a standard enemy AI would work. What exactly do you want it to do? I might not be able to help, but it would help others to have some more information :-) $\endgroup$
    – J Sargent
    Dec 30, 2014 at 16:28
  • $\begingroup$ I want link to tutorial... $\endgroup$ Dec 30, 2014 at 16:29
  • $\begingroup$ Something like this? $\endgroup$
    – J Sargent
    Dec 30, 2014 at 16:31
  • 2
    $\begingroup$ Sorry man, tutorial requests are strictly off-topic. See how to ask $\endgroup$
    – ruckus
    Dec 30, 2014 at 16:33
  • $\begingroup$ As you see, NoviceInDisguise gave me 1 already. But I don't understand, why are htye off-topic and what exactly off-topic means in this site. $\endgroup$ Dec 30, 2014 at 16:51

1 Answer 1


You need to use states. Basically this will be :

Near property Player > And > State set state 2

It will look like this.

enter image description here

Now on state two, you need an Always sensor rigged up to a Steering acctuator with the player being the target object.

To avoid being stuck in state 2 forever, make something to switch back when the player isn't nearby anymore.

  • $\begingroup$ Yes, that is near with invert selected which switches back to state 1. Thanks, this thing works!:) $\endgroup$ Dec 30, 2014 at 21:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .