OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Loup-Garou on 17 Feb 2004, 13:52:46

Title: unit gestures
Post by: Loup-Garou on 17 Feb 2004, 13:52:46
I want to make civilians more "alive" with animations like folding the arms or show a direction with hand... . Can I do this in the unit's init field ???  :)
Title: Re:unit gestures
Post by: headshot_snipe on 17 Feb 2004, 14:33:46
yes, you can have a full anim list on the comref in the

http://www.ofpec.com/editors/index.php (http://www.ofpec.com/editors/index.php)

hope that helps, oh and for the init field you can put this switchmove"whatevatheanimis", its better to use it in a script cuz you can time your anims and do a lot of em and it is easier if you know what you are doing.
Title: Re:unit gestures
Post by: The-Architect on 17 Feb 2004, 15:52:32
Also Hunter has made some new anims to go with the original BIS ones. Check them out at Ofp.gamezone.cz
Just search news and put Anims in the field.
Title: Re:unit gestures
Post by: dmakatra on 17 Feb 2004, 16:06:33
You can NOT use animations in init fields, only in on act fields and scripts.

:beat: *Gets Shot* :beat:
Title: Re:unit gestures
Post by: Raptorsaurus on 17 Feb 2004, 17:24:48
Search the editors depot.  There is a niffty mission/tutorial in there that list all the anims in the readme.  In the sample mission you can watch the different switchmove and playmove anims in action.  This really helps if you want to do several actions and pick ones that blend nicely with each other.
Title: Re:unit gestures
Post by: DBR_ONIX on 17 Feb 2004, 18:06:02
You can also activeate them though triggers :)
Might be more suited to the prob..
What? You never know :P
- Ben
Title: Re:unit gestures
Post by: Homefry31464 on 17 Feb 2004, 20:49:47
Can someone help me with these amination names, as I'm not sure what they are called, even though I checked the play/switchmove guides:

1.  When a unit crouches, after standing, then pressing "Q", as they look through the sights.

2. When you are walking after crouched, looking through the sights.

Thanks.

Title: Re:unit gestures
Post by: Loup-Garou on 20 Feb 2004, 22:43:34
Ok, here is the solution (example) : give a name to the unit you want "animated", link it (F2) with a trigger : On Activation : thenameofthe unit switchMove "FXToKneel"

In this example the unit will crouch. Other example, "FXStandSurUniv" (unit puts his hands behind head).

Note that I read that "playMove" is used too for gestures, but I didn't used it until now. Thanks to all  :cheers: !

Note (2) : seems "FXCivilFoldArms" doesn't work... .
Title: Re:unit gestures
Post by: h- on 20 Feb 2004, 23:04:28
Note (2) : seems "FXCivilFoldArms" doesn't work... .
I think all of the 'FXsomtin' (at least majority of them) work with playMove only...  ???
Title: Re:unit gestures
Post by: Loup-Garou on 21 Feb 2004, 20:07:26
That's not very important : after all, I had what I wanted : I didn't used "FXCivilFoldArms" ; nameofunit switchMove "FXToHand" works fine  :thumbsup: !
Title: Re:unit gestures
Post by: Loup-Garou on 09 Mar 2004, 15:45:58
Hi all  ;). I need some more information :

1) Some animations (FXToKnell, FXToHand...) don't stop when the unit is dead ; so, is there a simple solution to stop the gesture in this case (not (alive guy1)...) ?

2) Some others animations (like FXStandtoDip) play only a few seconds. What's the solution ? Things like "while", or "loop" ?
Title: Re:unit gestures
Post by: h- on 09 Mar 2004, 15:54:52
1. unit addEventHandler ["killed",{unit playMove ""; unit switchMove ""}]

May work or may not  :P

2. Definetely not "while". it loops at every frame (?) and has a limit of 10000 or something loops (can't remember the correct amount)

That "FXstandToDip" is an animation sequence leading from an animation to another so it is supposed to last only for a while...
Title: Re:unit gestures
Post by: macguba on 09 Mar 2004, 16:16:03
Switchmove gives an immediate transition to the new state:  playmove is more gradual.   Some animations only work with one or the other.   Some animations required the loon to be in a particular state (e.g. setbehaviour safe) to start with:  you cannot always go directly from one animation to another.
Title: Re:unit gestures
Post by: Loup-Garou on 13 Mar 2004, 16:04:07
Thanks to HateR_Kint, it works !  :D

Example : unit = civilian (name = Civ1) with a "FXToHand trigger". In the unit's init field you type : this addEventHandler ["killed",{Civ1 playMove "";Civ1 switchMove ""}]

However, there's still the problem about loops... .
Title: Re:unit gestures
Post by: _hammy_ on 13 Mar 2004, 17:09:07
theres a animation list in my command reference, link to download is in my sig.
Title: Re:unit gestures
Post by: Loup-Garou on 09 May 2004, 18:54:34
Ok ! I've found the script (thanks to dalton  : http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=15655). After some tests, I've changed it a little, so here's my solution :

1) In the editor, put in your unit's init field : [] exec "nameofthescript.sqs"


2) Put "nameofthescript.sqs" in your mission folder :

#loop
nameofyourunit switchMove "FXStandDip"

~3

goto "loop"

exit

TOPIC SOLVED !!!!!!!!!  :D  :D  :D  :D