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$
$\endgroup$
10
-
$\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 SargentCommented Dec 30, 2014 at 16:28
-
$\begingroup$ I want link to tutorial... $\endgroup$– Adrians NetlisCommented Dec 30, 2014 at 16:29
-
$\begingroup$ Something like this? $\endgroup$– J SargentCommented Dec 30, 2014 at 16:31
-
2$\begingroup$ Sorry man, tutorial requests are strictly off-topic. See how to ask $\endgroup$– ruckusCommented 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$– Adrians NetlisCommented Dec 30, 2014 at 16:51
|
Show 5 more comments
1 Answer
$\begingroup$
$\endgroup$
1
You need to use states. Basically this will be :
Near property Player > And > State set state 2
It will look like this.
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$ Commented Dec 30, 2014 at 21:09