Jump to content
Sign in to follow this  
Ghosthawk

CH49 Mohawk Cargo Ramp Script

Recommended Posts

Hi,

i just made a script to open the Cargo Ramp of the Mohawk. Put this in the Init of your Mohawk and name it "heli":

if (isNil {heli getVariable "open"}) then {heli setVariable["open", false, true];};

this addAction [ "Rampe öffnen", {

heli animate ["CargoRamp_Open",1];

heli setVariable["open", true, true]; }

,[],1,false,true,"", "(driver _target == _this) && !(heli getVariable 'open')" ];

this addAction [ "Rampe schliessen", {

heli animate ["CargoRamp_Open",0];

heli setVariable ["open", false, true]; }

,[],1,false,true,"", "(driver _target == _this) && (heli getVariable 'open')" ];

Now you can open the ramp as the pilot. But how do i manage to open it only if i am in the cargo seats?

Changing driver _target to cargo _target does not work.

Can somebody help me please?

Share this post


Link to post
Share on other sites

Use the crew command for getting an array of all inside the helicopter. Then exclude pilot and copilot.

Share this post


Link to post
Share on other sites

_this in assignedCargo _target

Hmm, seems players aren't unassigned when they get out. Lame. Nm this.

Edited by kylania

Share this post


Link to post
Share on other sites

I tried both but i can't get it to work..

Could you please show me what i have to write exactly?

Share this post


Link to post
Share on other sites

"(_this != driver _target) && _this in (crew _target) && (heli getVariable 'open')"

Again, didn't test it.

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  

×