Home   Help Search Login Register  

Author Topic: Please try this!  (Read 834 times)

0 Members and 1 Guest are viewing this topic.

funkster

  • Guest
Please try this!
« on: 11 Sep 2005, 04:10:17 »
Hi all,
I have a slight prob, hard to explain, please do me a favour, and try making a little script like so:

Create a unit (mine is called EMtwo in this script), and start close to it. In the init field of the unit call a script that has the following:

Code: [Select]

EMtwo SwitchMove "FXStandSurDown"
~ 3

EMtwo SwitchMove "FXexecution"

~ 3

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

EXIT



Now, kill him (you should be right next to him)

And watch him die. This is a problem, any idea why this happens, or what I can do to stop[ it?

Thanks :)

Kyle Sarnik

  • Guest
Re:Please try this!
« Reply #1 on: 11 Sep 2005, 04:51:54 »
Im sorry, but whats the problem? He is dead? Well yea you shot him, but seriously whats wrong with it?

funkster

  • Guest
Re:Please try this!
« Reply #2 on: 11 Sep 2005, 09:31:50 »
ok, so it didnt happen for you? I wondered if it was just something im doing.

When i do it, he dies (from kneeling). Then about two seconds later, he dies again, this time miraculously from standing up! I cant figure out why, and its really messing things up for me quite a bit...


Kyle Sarnik

  • Guest
Re:Please try this!
« Reply #3 on: 11 Sep 2005, 18:34:31 »
I yes I've seen that before. I believe its because when the FX death anim is played, it finishes and then the unit dies normally. I wouldn't suggest using an eventhandler for that, try a simple loop checking if hes dead and if so play the animation once and exit.

Offline Blanco

  • Former Staff
  • ****
Search or search or search before you ask.

funkster

  • Guest
Re:Please try this!
« Reply #5 on: 12 Sep 2005, 00:23:30 »
Ok, thanks guys.

The thing is though, if you dont put in something to detect when he has been killed, he just kneels there. You can shoot the absolute hell out of him, but he still stands there - this suggests that whatever animation you call last, just stays until its told to.

So the question then is, why, when you do the death animation does it not do the same thing, and stay in the dead position?

Anyway, thanks Blanco, I think that link gives me what I need to know...