Home   Help Search Login Register  

Author Topic: Playmove looping  (Read 434 times)

0 Members and 1 Guest are viewing this topic.

Drozdov

  • Guest
Playmove looping
« on: 22 Aug 2003, 14:19:13 »
Is there any way to loop an action using the playmove command? I want to loop one of the talking effect actions. I'd rather not have to write a script since I don't know how.

Also, is there any way to keep a person sitting, apart form using the switchmove "FXstandsitdownstill" which obviously has its drawbacks. All the other ways of commanding someone to sit allow them to stand up again a few seconds later. And hey, even soldiers need to rest sometimes.

Ace Productions

  • Guest
Re:Playmove looping
« Reply #1 on: 22 Aug 2003, 14:27:24 »
What I tried and it works is a 3 line script that can go in a trigger or in th init:

#repeat
unitname SwitchMove "EffectStandTalk"
GoTo repeat

Problem is the unit will do continuously until the mission ends or you plant a bullet in his head!  :)

Drozdov

  • Guest
Re:Playmove looping
« Reply #2 on: 22 Aug 2003, 14:30:26 »
Thanks, that's all I was looking for. It's only really for atmosphere (I was going to use it for civvys in towns) so it doesn't matter if it goes on for ever. Although there should be a way to specify the number of loops it does...

Edit: The Exit command might stop the script. That'd halt the chatterbox  ::).
« Last Edit: 22 Aug 2003, 14:31:58 by Drozdov »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Playmove looping
« Reply #3 on: 22 Aug 2003, 14:35:28 »
Three minor details:

A loop must always have a time delay like this:
~1

The label must be in quotes.
goto "repeat"

And a good loop always includes a conditional line, so that you can escape.  For example,
? stopLoop: exit

If you want to do it with a counter your loop will look like this



_counter=0

#repeat

_counter=_counter+1
? _counter > 12: goto "end"

~1

loon1 SwitchMove "EffectStandTalk"

goto "repeat"

#end
loon1 SwitchMove "null"
exit


Plenty of reviewed ArmA missions for you to play

Drozdov

  • Guest
Re:Playmove looping
« Reply #4 on: 22 Aug 2003, 17:24:41 »
Thanks macguba. That should do it. Now about the sitting down thing... ;)