Jump to content
Sign in to follow this  
SUPR3ME KILL3R

Force landing gear out on helicopter

Recommended Posts

I'm modifying a script designed for APC's to make infantry disembark better, to work with helicopters and it works, except on one helicopter, the V-22 osprey addon.

Problem i'm having is that I'm forcing the helicopters to land with a script that works, but the V-22 does not deploy its landing gear as it gets closer to the ground.

So, can I force it to animate the landing gear out? Such as

_Vehicle animate ["landing_gear",1]

Where do I find the name of that animation?

Share this post


Link to post
Share on other sites

The named animations are;

gear_nose

gear_n_door_l

gear_n_door_r

gear_left

gear_l_door

gear_right

gear_r_door

The command would be similar

_v22 animate ["NAMEDANIMATION",1];

Not sure if it will stay working with AI in the pilot seat.

Share this post


Link to post
Share on other sites

Those didn't work, or maybe its just my inexperience with it.

Maybe I could live without it, the osprey doesn't explode when it lands it just clips the ground and deploys landing gear about 5 seconds late and it looks annoying.

I dont have this problem with say, a UH-60 because it has no retractable landing gear.

Heres the script I wrote to land helicopters and then start another script, which I modified to work with the osprey. This basically forces them to land, slowing down as it gets closer to the ground, and when everyone gets out, script exits and the chopper flys on.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_group = _this select 0

_vehicle= _this select 1

_vehicle animate ["gear_nose",1]

_vehicle animate ["gear_left",1]

_vehicle animate ["gear_right",1]

_vehicle animate ["gear_n_door_l",1]

_vehicle animate ["gear_n_door_r",1]

_vehicle animate ["gear_r_door",1]

_vehicle animate ["gear_l_door",1]

#heliland

_v = Velocity _vehicle

_vehicle setVelocity  [((_v select 0) / 1.001), ((_v select 1) / 1.001), -6]

~0.01

?getPos (driver _vehicle) select 2 > 10: goto "heliland"

?getPos (driver _vehicle) select 2 <= 10: goto "heliland2"

#heliland2

_v = Velocity _vehicle

_vehicle setVelocity  [((_v select 0) / 1.001), ((_v select 1) / 1.001), -3]

~0.01

?getPos (driver _vehicle) select 2 > 5: goto "heliland2"

?getPos (driver _vehicle) select 2 <= 5:[_group,_vehicle] exec "lech_dismount_osprey.sqs"

?getPos (driver _vehicle) select 2 <= 5: goto "heliland3"

#heliland3

_v = Velocity _vehicle

_vehicle setVelocity  [((_v select 0) / 1.001), ((_v select 1) / 1.001), -0.5]

~0.01

?({vehicle _x == _vehicle} count units (_group) <= 0 ): exit

?getPos (driver _vehicle) select 2 <= 5: goto "heliland3"

It works really well, when it works.

Share this post


Link to post
Share on other sites

Are you trying to force it to land in a exact certain spot?

Simpler solution is likely to be put an invisible "H" at the desired location and simply do a;

_chopper land "LAND"

The disembark the group

{unassignVehicle _x; sleep 2;} forEach units group Leader1;

That way the chopper lands itself.

Share this post


Link to post
Share on other sites
Quote[/b] ]Are you trying to force it to land in a exact certain spot?

Simpler solution is likely to be put an invisible "H" at the desired location and simply do a;

_chopper land "LAND"

The disembark the group

{unassignVehicle _x; sleep 2;} forEach units group Leader1;

That way the chopper lands itself.

I know this, but the helicopters are under fire so i'm trying to get them to land quickly, not accurately

Share this post


Link to post
Share on other sites

you're right, doesn't work, probably because the "Controller" for these animations is the game engine itself, not User controlled like the cargo doors.

"cargodoor_down" - lower ramp

"cargodoor_up" - upper door

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×