View Full Version : Need help - helicopter landing gear
Fixed it, new question: How to move landing gear left or right during/after retracting?
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).
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.
Ok, great, I'll check it out.
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 "dkmm_emotor"
_chopper animate ["gear_ind",1]
_chopper animate ["turn_gearL",1]
_chopper animate ["turn_gearR",1]
_chopper animate ["retract_rearwheel",1]
@<hidden> animationphase "turn_gearR" == 1
_chopper animate ["close_maingearlidR",1]
@<hidden> animationphase "turn_gearL" == 1
_chopper animate ["close_maingearlidL",1]
exit
#Extract_gear
_chopper vehicleradio "dkmm_emotor"
_chopper animate ["close_maingearlidL",0]
_chopper animate ["close_maingearlidR",0]
~1.5
_chopper animate ["turn_gearL",0]
_chopper animate ["turn_gearR",0]
_chopper animate ["retract_rearwheel",0]
_chopper animate ["gear_ind",0]
exit
[/QUOTE]<span id='postcolor'>
I'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'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.
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 "turn_gearL" == 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
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.