OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Alt3c on 08 Sep 2003, 18:19:30

Title: Animations or something
Post by: Alt3c on 08 Sep 2003, 18:19:30
Hello, im new here and I have a question:
Example:
(http://ofp.gamezone.cz/news/pics/DesertMarines.jpg)


The idea is to make a unit stand like the guy in the front and the one next to him :)
And how to make them kneel? anyone know's that?
Title: Re:Animations or something
Post by: Drozdov on 08 Sep 2003, 18:31:53
Kneel as in what? As in crouch? Or kneel down? Try either of these...

unitname switchmove "fxtokneel" *

unitname switchmove "combattocrouch"

* Only available in Resistance
Title: Re:Animations or something
Post by: Alt3c on 08 Sep 2003, 18:34:12
K, thanks... do you also know how to make the units stand like the soldiers on the picture?

Hmmm anaimations don't work, too bad :(
Title: Re:Animations or something
Post by: Drozdov on 08 Sep 2003, 18:40:47
I don't. :help:
Title: Re:Animations or something
Post by: Harkonin on 08 Sep 2003, 19:40:24
you need them set to safe and if you want them to crouch for an extended time you'll need a loop


_crouchloop = 0
#loop
_crouchloop = + 1

dude switchmove "crouch"

~.001

? _crouchloop == 300: goto "stand"

goto "loop"

#stand
exit

and if you want them to go back to normal after an event put in a condition
for example

?(endcrouch):goto"stand"

endcrouch being whatever you want to happen - enemy detected or something.

Hope that helps.
Title: Re:Animations or something
Post by: KJAM on 08 Sep 2003, 20:03:09
go to www.ofpnews.info and in the search look for JSDF or something similar there are a lot of animations which are cool
Title: Re:Animations or something
Post by: Alt3c on 08 Sep 2003, 20:34:44
K, find that... read the instructions,
quote:

In my ADDON, there is some standing animations and marching animations. To
use it, put the JSDFcustomanim.pbo to ADDONS folder. In the OFP editer, use
UNIT switchmove "ANIMATION" to start the animation. (List is below).


But i got the list, now how do I use it in-game?
Title: Re:Animations or something
Post by: Kaliyuga on 08 Sep 2003, 20:37:44
use
UNIT switchmove "ANIMATION" to start the animation

you could try using that ;)

Title: Re:Animations or something
Post by: Alt3c on 08 Sep 2003, 21:21:28
Ok, done, but what to do after that?
Title: Re:Animations or something
Post by: unkie on 09 Sep 2003, 12:14:32
wot do u mean? theres your animation....if it doesnt work in the init field (i think it does) use it in a trigger...that way you can get them back to normal too
Title: Re:Animations or something
Post by: Alt3c on 22 Sep 2003, 16:32:19
Still doesn't work, my soldiers are staying normal when I set the anims in the init and i tried to stand them safe or normal

plz help...
Title: Re:Animations or something
Post by: GrimMonkey on 22 Sep 2003, 16:45:04
You may have already done some of this but I'm going to tell you again:
Get a soldier,
Type: this setbehaviour "safe"; this switchmove "JDSFGuard1", in his command line.

It might not be JDSF but JSDF, hmmm, not sure...
You can also select "Safe" in a waypoint. It should come with a list of all the animations.


Beware the GrimMonkey
Title: Re:Animations or something
Post by: Alt3c on 22 Sep 2003, 19:19:43
Done exactly what you said:
(http://community.webshots.com/s/image7/2/58/74/91525874BqpMNV_ph.jpg)


Still only stands on "save"
Title: Re:Animations or something
Post by: Jo Jo Joni on 22 Sep 2003, 22:24:25
As far as I know switchmove or playmove commands won't work if you use them in unit init's field.  :(

You can try to insert a trigger with these parameters:
Condition: true
On Activation: unitname switchmove "whatever"

You could also try to write that in the "init.sqs" script (don't know if this will work as i've never tried it).
Title: Re:Animations or something
Post by: KyleSarnik on 22 Sep 2003, 22:36:50
Yes Jo Jo Joni is right, switchmove and playmove only work when activated by a trigger, WP, or script. Putting it in the init line will get you no where.