Home   Help Search Login Register  

Author Topic: Death animation loop  (Read 593 times)

0 Members and 1 Guest are viewing this topic.

funkster

  • Guest
Death animation loop
« on: 08 Sep 2005, 01:10:45 »
Hi,

I have a soldier that has just performed "switchMove FXexecution"

He does this, and is then shot. but because of the animation, he stays in his position.

SO, in order that he performes the daeth animation when shot, I have created a script in his initialization field called "deathloop" which constantly runs, here it is:

Quote
;this loop will check when East Man has been shot, and activate the death animation:

#checkloop
if ((getDammage EMtwo) == 1) then goto "death"
~ 0.01
goto "checkloop"


#death

EMtwo switchMove FXexecutionDead

EXIT

There is no error message, but at the same time, you can shoot the hell out of him if you want. but he'll be dammed if he wants to die!

Any ideas what is going wrong?

Thanks ;)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Death animation loop
« Reply #1 on: 08 Sep 2005, 01:13:25 »
I suggest you drop the loop and give him a {killed} event handler instead to make him do the switch move.  Some thing like:

EMtwo  AddEventHandler [{killed},{EMtwo switchMove "FXexecutionDead"}]

Then as soon as he is killed he will do the move.

By the way I believe the problem with the script is this line:

EMtwo switchMove FXexecutionDead


It should be

EMtwo switchMove "FXexecutionDead"

« Last Edit: 08 Sep 2005, 01:19:13 by THobson »

Offline Blanco

  • Former Staff
  • ****
« Last Edit: 08 Sep 2005, 02:13:58 by Blanco »
Search or search or search before you ask.