OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Maurekk on 04 Feb 2004, 00:42:23

Title: Animations-Script
Post 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 !
Title: Re:Animations-Script
Post by: gundernak on 04 Feb 2004, 01:42:45
You have to loop the animation....

And you need a variable. Let's say now: AnimStopped.

Script draft:
Code: [Select]
#loop
unitname switchMove ...(or playMove)... animationthingy

? AnimStopped: goto "out"

goto "loop"

#out
unitname switchMove ...(or playMove)... otheranimationthingy

exit
All else you have to do is to define 'AnimStopped' variable as false in the init.sqs.
Code: [Select]
AnimStopped = false
And your trigger 'on activation' will be: AnimStopped = true.

You see the trigger will abort the animation...
Title: Re:Animations-Script
Post by: Maurekk on 04 Feb 2004, 11:29:53
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
Title: Re:Animations-Script
Post by: gundernak on 04 Feb 2004, 11:51:13
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'...
Title: Re:Animations-Script
Post by: Maurekk on 04 Feb 2004, 13:51:35
#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 :(
Title: Re:Animations-Script
Post by: gundernak on 04 Feb 2004, 14:43:47
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?
Title: Re:Animations-Script
Post by: Maurekk on 04 Feb 2004, 16:27:17
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
Title: Re:Animations-Script
Post by: Tomb on 04 Feb 2004, 17:04:29
have U tried :

    Bob switchMove "auto"  :o

 or :


    bob switchMove "null"    ??? :)