OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Maurekk on 04 Feb 2004, 00:42:23
-
Hello
Well as u know some animations are ending after a time, so i want to make an script what makes the animation "work" till i say him with for instance a trigger that the soldier should go to his normal standart animation -> effectstand when im right plz help me Thx !
-
You have to loop the animation....
And you need a variable. Let's say now: AnimStopped.
Script draft:
#loop
unitname switchMove ...(or playMove)... animationthingy
? AnimStopped: goto "out"
goto "loop"
#out
unitname switchMove ...(or playMove)... otheranimationthingy
exitAll else you have to do is to define 'AnimStopped' variable as false in the init.sqs.
AnimStopped = false
And your trigger 'on activation' will be: AnimStopped = true.
You see the trigger will abort the animation...
-
THX for reply but it doesnt work!
The animtaions stopps for a few seconds into effectstand but then it start again with the other animation !
#loop
s1 switchMove "stand10"
? go: goto "out"
goto "loop"
#out
s1 switchmove "effectstand"
exit
-
At first set the loop, to work perfectly. No matter you can stop it or not.
I guess you have to apply a little delay, before goto. Depends on how long is your choosen animetion you want to loop. (I you maybe do not know delay: it is in secs, a four sec delay looks like ~4).
You have to try to use 'playMove' command as well.
When you loop an animation, it can happen that OFP 'remembers' all of the given command by the loop. You can imagine it as a buffer, which records all of the commands and execute the new command only when the last looped command is executed. In my experiences... ::)
So when you got the endless looped animation, you can go towards and insert the condition which can brake the loop.
Make sure this variable is set to false in the init field. And this variable (you named 'go' now) became true by a trigger 'on activation'...
-
#loop
s1 switchMove "stand10"
~9
? go: goto "out"
goto "loop"
#out
s1 switchmove "effectstand"
exit
doesnt work
the soldier makes the animation till i activate the trigger than he takes the gun on his back for 9 sec then he makes the stand10 animation for 9 sec again and then the goes into effectstand
hlep :(
-
I tryed the script.
But I can not find animations named "stand10" or "effectstand" in the Character Animations Appendix...
Where did you find these animations you use?
and
What kind of effect do you want to see?
-
stadn 10 is from an addon : Hunters static addons the link was a few days ago on ofp.info
and effectdtand is the animation to stop any other animations !!
and waht i want is that when I activate a trigger that the script stops with the stand10 animation and goes into normal animation gun in hand
-
have U tried :
Bob switchMove "auto" :o
or :
bob switchMove "null" ??? :)