Home   Help Search Login Register  

Author Topic: Animations-Script  (Read 1136 times)

0 Members and 1 Guest are viewing this topic.

Maurekk

  • Guest
Animations-Script
« 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 !

gundernak

  • Guest
Re:Animations-Script
« Reply #1 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...

Maurekk

  • Guest
Re:Animations-Script
« Reply #2 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
« Last Edit: 04 Feb 2004, 11:30:40 by Maurekk »

gundernak

  • Guest
Re:Animations-Script
« Reply #3 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'...

Maurekk

  • Guest
Re:Animations-Script
« Reply #4 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 :(
« Last Edit: 04 Feb 2004, 13:59:30 by Maurekk »

gundernak

  • Guest
Re:Animations-Script
« Reply #5 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?

Maurekk

  • Guest
Re:Animations-Script
« Reply #6 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

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Animations-Script
« Reply #7 on: 04 Feb 2004, 17:04:29 »
have U tried :

    Bob switchMove "auto"  :o

 or :


    bob switchMove "null"    ??? :)