OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dmakatra on 15 Jun 2003, 21:24:21

Title: is he lying on the ground?
Post by: dmakatra on 15 Jun 2003, 21:24:21
Sorry for the n00bin but I couldnt find anythin in the command reference or in the FAQ. How do you check if a unit is lying on the ground? Thx in advance.

:cheers:
Title: Re:is he lying on the ground?
Post by: LCD on 15 Jun 2003, 22:23:36
no way ?

LCD OUT
Title: Re:is he lying on the ground?
Post by: dmakatra on 15 Jun 2003, 22:34:21
What? There must be... :-\
Title: Re:is he lying on the ground?
Post by: dmakatra on 15 Jun 2003, 22:44:45
OK, if there isnt away to check if a unit is lying on the ground then is there a way to do an animation exactly after the first one is done. I have this script where u are doin the "medic-patch-up-animation". Now, if the unit is lying down then it takes more time for him to do the animation(he have to stand up) then for a guy already standing up. If I use the same waiting time on both either the animation will not complete on the guy whos lying down or the animation will be done and the player just stands there. Is there anyway to fix this?
Title: Re:is he lying on the ground?
Post by: Ace on 15 Jun 2003, 23:02:36
There might bea chance u can use the animationphase command.

But I'm not sure
Title: Re:is he lying on the ground?
Post by: dmakatra on 16 Jun 2003, 12:14:25
I mean the switchmove/playmove animations/moves. Or will this command u are talkin bout work on switchmove/playmove too?
Title: Re:is he lying on the ground?
Post by: Ace on 16 Jun 2003, 17:42:10
it might.

I've only found it used on addon animations. (Like the goggles on BAS units)

but in theory.... ???
Title: Re:is he lying on the ground?
Post by: dmakatra on 16 Jun 2003, 17:57:50
Thx but what do animationphase do? I didnÂ't understand the explaination in the command refernce :-[.
Title: Re:is he lying on the ground?
Post by: Ace on 16 Jun 2003, 18:30:41
(_Man animationPhase "SitDown" >= 0.01)

I believe that means the instance he starts aniamtion

(_Man animationPhase "SitDown" >= 0.05)

I believe this means half way through aniamtion

(_Man animationPhase "SitDown" >= 1.00)

Aniamtion Complete
none of this is guaranteed mind..
Title: Re:is he lying on the ground?
Post by: dmakatra on 16 Jun 2003, 18:43:50
OK, IÂ'll try that.
Title: Re:is he lying on the ground?
Post by: dmakatra on 16 Jun 2003, 19:37:14
No that didnÂ't work either :-\
Title: Re:is he lying on the ground?
Post by: Kaliyuga on 16 Jun 2003, 21:15:13
animation phase is more like when you have  an addon.. like say the Everon Cartel Safe we made...

for the animation on it   the door is either closed or opened so it is in either phase 0 or phase 1  so you can use something like this condition:

safe animationphase "arm" > 0.7

to detect when the door has opened

the animations your after are soldier animations and I'm pretty sure the animation phase has nothin to do with the animation files for soldier models..  it's more something that is defined in O2



Title: Re:is he lying on the ground?
Post by: dmakatra on 16 Jun 2003, 21:34:18
OK, but no1 know how I can solve this?
Title: Re:is he lying on the ground?
Post by: LCD on 17 Jun 2003, 00:28:58
yep read da sec post again - we tried 2 do dat som times

LCD OUT
Title: Re:is he lying on the ground?
Post by: MI_Fred on 17 Jun 2003, 01:35:25
Without more info I'd say you should simply make the lying guy stand up, with setUnitPos "up". That is if he is not a player. Hard to force a player.. and if this is needed when a unit is wounded so he can't stand, detect that with canStand. Buuut I'd really not get hopes up.  :-\
Title: Re:is he lying on the ground?
Post by: dmakatra on 17 Jun 2003, 10:39:13
Shit... The unit is the player... Are there a way then to start a playmove/switchmove in the middle of it? Like u skip the part where the guy is actually standin and moves down so itÂ'll be like a long combattomedic move instead of a short one? I hope u understand what I mean here. :-\
Title: Re:is he lying on the ground?
Post by: Ace on 17 Jun 2003, 10:54:09
Quote
the animations your after are soldier animations and I'm pretty sure the animation phase has nothin to do with the animation files for soldier models..  it's more something that is defined in O2


Yeah thats what I thought.... Oh well, try and learn.
Title: Re:is he lying on the ground?
Post by: Zayfod on 03 Oct 2003, 05:19:33
Hmmmmmm what about the get pitch /bank function.

Aint tried it meself, might work u never know.

If it does give me a yell cause id love to knnow too :)

Zay