PDA

View Full Version : Need help - helicopter landing gear



Franze
Feb 1 2003, 23:53
Fixed it, new question: How to move landing gear left or right during/after retracting?

Franze
Feb 2 2003, 01:06
Well I fixed it, but I don't have any clue what was wrong with it. http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif I started from scratch and strangely enough, it works now. So, new question: after the gear has retracted, is there any possible way to make the gear move left or right during/after retraction?

Rastavovich
Feb 2 2003, 08:29
Not possible, you can only use one animation per section (except on weapon turrets).

Franze
Feb 2 2003, 17:04
Ok then, heres another one: how do you get gear doors to function right? Ie, landing gear goes down, door opens and then closes when gear is down.

Rastavovich
Feb 2 2003, 19:35
That is done by scripts in which the exact following of the animation is written. Look in the dkmm_animations.sqs of our comanche, there you can see some examples.

Franze
Feb 2 2003, 23:47
Ok, great, I'll check it out.

Franze
Feb 3 2003, 00:40
So how does this function:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
#Retract_gear
_chopper vehicleradio &#34;dkmm_emotor&#34;
_chopper animate &#91;&#34;gear_ind&#34;,1&#93;
_chopper animate &#91;&#34;turn_gearL&#34;,1&#93;
_chopper animate &#91;&#34;turn_gearR&#34;,1&#93;
_chopper animate &#91;&#34;retract_rearwheel&#34;,1&#93;
@<hidden> animationphase &#34;turn_gearR&#34; == 1
_chopper animate &#91;&#34;close_maingearlidR&#34;,1&#93;
@<hidden> animationphase &#34;turn_gearL&#34; == 1
_chopper animate &#91;&#34;close_maingearlidL&#34;,1&#93;
exit
#Extract_gear
_chopper vehicleradio &#34;dkmm_emotor&#34;
_chopper animate &#91;&#34;close_maingearlidL&#34;,0&#93;
_chopper animate &#91;&#34;close_maingearlidR&#34;,0&#93;
~1.5
_chopper animate &#91;&#34;turn_gearL&#34;,0&#93;
_chopper animate &#91;&#34;turn_gearR&#34;,0&#93;
_chopper animate &#91;&#34;retract_rearwheel&#34;,0&#93;
_chopper animate &#91;&#34;gear_ind&#34;,0&#93;
exit
[/QUOTE]<span id='postcolor'>

I&#39;ve tried the "animationphase" with little success. Do I need a extra animation to trigger the doors so that they will close at a certain point?

Rastavovich
Feb 3 2003, 06:36
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I&#39;ve tried the "animationphase" with little success. Do I need a extra animation to trigger the doors so that they will close at a certain point?[/QUOTE]<span id='postcolor'>

No there are the @<hidden> for. The script checks there if a certain point of the animation has allready reached and continues then with the next animation.

Franze
Feb 3 2003, 13:49
So this line of code:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
@<hidden> animationphase &#34;turn_gearL&#34; == 1
[/QUOTE]<span id='postcolor'>

Would mean that the animation(s) below it would initialize after a second the "turn_gearL" animation is activated?

Rastavovich
Feb 3 2003, 15:28
No, in config you define angle0 and angle1 of an animation.

@<hidden> animationphase "turn_gearL" == 1 means that the animation has to be at angle1 to go ahead in the script.

animationphase "turn_gearL" == 0 (gear is extracted)
animationphase "turn_gearL" == 1 (gear is retracted)

You can check for every value between 0 and 1.
For example:
animationphase "turn_gearL" <= 0.5

Franze
Feb 3 2003, 16:14
Ah, ok. I figured out what was wrong though - I was using "animate" in my config file rather than executing a script. Now the gear and gear doors function properly (although sometimes hitting "lower gear" and "retract gear" quickly will make the doors function improperly).

Rastavovich
Feb 3 2003, 16:27
well, to avoid that make the actions only appear if the animation is completed. Can be done over the condition part of user actions.