Page 1 of 1

How to Force an NPC to Perform an Animation

Posted: 02 Nov 2017, 22:45
by DoctorX
Can't seem to glean this one from the code.

Trying to get an NPC to perform the "help wounded" animation on the actor, the same animation they do when giving a medkit to a wounded npc.

I thought state_mgr.set_state would do the trick, but it isn't triggering the animation on the npc. What is the proper way to make this happen?

Re: How to Force an NPC to Perform an Animation

Posted: 13 Nov 2017, 16:24
by Alundaio
hmmm could of swore i replied but guess i forgot to hit submit. To get ai to do things you must create a generic type scheme. Npc_vs_box probably simplest example that can be copied amd renamed. In the action execute use set state but probably want to use new anim since help wounded triggers a function on anim end unrelated to actor or can just modify it to jave condotion for actor.