Home   Help Search Login Register  

Author Topic: Help w/ switchmove  (Read 703 times)

0 Members and 1 Guest are viewing this topic.

Dagon

  • Guest
Help w/ switchmove
« on: 06 Sep 2005, 12:21:09 »
I'm trying to make certain loons play dead with the

"This SwitchMove "CombatDeadVer3""

string. Yet they refuse to play dead, and no other 'dead' animations (nor medic animations which I need too - they're playing dead and being healed by medics) seem to work.

Any help?

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Help w/ switchmove
« Reply #1 on: 06 Sep 2005, 12:35:14 »
Sometimes commands that are run as soon as the game starts (ie in the init fields of a unit) don't work - they need a short delay - and switchmove seems to be one of them. you have a couple of options.-

1.) name the units you want to start off injured. Make a trigger, and change it's Activation field from 'this' to 'true', select the 'countdown' option, and in the min, mid and max boxes, put a small delay, such as 0.2. Then in the activation field, put this:
{_x switchmove "CombatDeadVer3"} foreach [unit1, unit2, unit3]
where unit1 and so on are the names you gave the units.

2.) create a new script.
;Animate.sqs
~0.2
(_this select 0) switchmove "CombatDeadVer3"
In each unit you want to start off dead, put the following: [this] exec "animate.sqs"

Apologies if you know all the coding stuff already. Just covering my bases in case you didn't ;)
« Last Edit: 06 Sep 2005, 12:35:42 by Fragorl »

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Help w/ switchmove
« Reply #2 on: 06 Sep 2005, 12:56:15 »
you have a couple of options.... create a new script.
;Animate.sqs
~0.2
(_this select 0) switchmove "CombatDeadVer3"

Or even easier, write:
Code: [Select]
~0.01
{_x switchmove "CombatDeadVer3"} foreach [unit1, unit2, unit3]
in the init.sqs
OFPEC | Intel Depot
RETARDED Ooops... Retired!