Home   Help Search Login Register  

Author Topic: looping your actions...  (Read 519 times)

0 Members and 1 Guest are viewing this topic.

sthlmknas

  • Guest
looping your actions...
« on: 08 Jan 2004, 23:40:02 »
hey!

I got 2 questions.

1. I want to make a wounded soldier lying on the ground in pains.
I type: unitname playmove "Lying";unitname playmove "LyingToTreatedLying"
What happends then is that the soldier is lying on the ground but only for 30 seconds or so then
he stands up! I want him to stay down all the time!! How do I do that??

And the next question!

I want a trigger to activate when a WHOLE enemy group is eliminated! Not only the groupleader the whole group! I know it must be possible without a script! And is there any way to give a group a common name?  

Hope u understand my questions my english is not 100%   :P :P :P ;)

Thank you!


Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:looping your actions...
« Reply #1 on: 08 Jan 2004, 23:45:13 »
1. i think switchmove does that

2. yeah, do "groupname = group manname."  to check if they're all dead, i think "(count units groupname) == 0" works.

GrimMonkey

  • Guest
Re:looping your actions...
« Reply #2 on: 09 Jan 2004, 00:53:21 »
1. Or right before you make playmove, type:
Code: [Select]
UnitName SetUnitPos "Down"
When you want to disable this, type:
Code: [Select]
UnitName SetUnitPos "Auto"
2. Name the group grp1 and write in a trigger:
Code: [Select]
! (Alive Grp1)as the condition. This is not garunteed to work, fiddle around with it if it doesn't.

.pablo.'s way should work though.


Beware the GrimMonkey

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:looping your actions...
« Reply #3 on: 09 Jan 2004, 01:47:25 »
1.   In a script:-

#loop1
~0.94    (you must always have a delay in a loop)
switchmove or whatever code you like
? condition: exit
goto "loop1"


2.   Create a trigger.   Now group it (F2 then drag and drop) to the group in question.   You now get new options in the On Activation box.

Alternatively,

"not alive _x" forEach units grp1

Syntax not guaranteed.  
Plenty of reviewed ArmA missions for you to play