OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Raptorsaurus on 25 Jan 2005, 10:42:00
-
Does anyone know how to keep the AI goons looking through the binoculars? I can get them to use them (using either selectWeapon "binocular" or by using the switchmove command), but they always just look for a second and then put them away right away. Is there anyway to make them keep the binoculars up at there face?
-
Use a loop to issue the command continually.
-
YOU COULD try putting a waypoint with the play/switchmove and then put a CYCLE waypoint on top of the 1st one.
;)
It works for pressups and stand and talk etc.....
IT might not work but all you can do is try.
GOOD LUCK
;D
-
Use a loop to issue the command continually.
I tried it already. They just very quickly take them out and put them away, it looks realy bad. :-[
If taking out the binoculars was an "instant" animation (like switchmove "para"), then it would work, but since it is a drawn out animation it just looks bad.
YOU COULD try putting a waypoint with the play/switchmove and then put a CYCLE waypoint on top of the 1st one.
It works for pressups and stand and talk etc.....
Same problem as a loop. This trick works for pushups and talking because these are sequential animation and you want that sequence. But I do not want the binocular to sequence, I want it to stop at there face and stay there. One would think that switchmove would do this as long as you do not issue the swithmove that put the binocuars away!
-
I figured it out!! I did not know that there is an "instant"animation for keeping the binoculars to the face. there are several:
"BinocLying"
"BinocStand"
"BinocCrouch"
So I made a script that transitions from the animated switchmove (that make them take out the binoculars and put them to there face) to the hold position switchmove. I made the script general so you could send it any animation, any hold position, a transition time (since animations take different time) and a hold time (so you can make the sucker "hold the pose" for as many seconds as you want). I made the script so that it uses real time (not the wait or ~ (because that is not as reliable for precise timing. The scipt is attached in case anyone watching this thread has had similar problems. I will also post it at the editor depot when I have time to do a little demo mission.
Here is an example of how the script is called:
[unit, "LyingToBinocLying", "BinocLying", 2, 10] exec "do_hold_anim.sqs"
I will call this solved!!