Jump to content
Sign in to follow this  
maffa

Helicopter startup time via repair-like script

Recommended Posts

Hello everyone.

I'd like to find a way to simulate the startup time required for an helicopter to pass from cold & dark to operational. I thought the bestest way to simulate it would be having the pilot (as in "pilot" role only) in place, maybe having a contextual menu choice "startup sequence", and having it staying in place for 5 or so minutes. The actual action taking place would be as if the pilot was "repairing" the ENG, MROT, ATRQ and INST of the helicopter from red to green -as in he's turning them nominal- in 5 minutes. I would like to keep this script because i like the idea of actually waiting for a aircraft to be brough from cold and dark to operational, even if the cockpit is not clickable.

As i said, that is the bestest way, not keeping in mind stuff like feasibility and knowledge to do so. The bottom line of such a scenario would be stripping everthing to having anyone sitting in place for X before actually take off could be a cheaper choice, or a trigger countdown when someone enters the area to make the aircraft available -only thing is i dont know where to start from even in this cheaper form...

Thank you all for your trouble

Edited by Maffa

Share this post


Link to post
Share on other sites

LOL power of selfempowerment! i made a very simple script myself, im going to leave it here, should anyone need something like this. This is how i meant it to be: only a pilot (as in class) can get the action from the action menu, and only when he is in the pilot position. He can only see the action when inside the vehicle. once initiated, the startup sequence cannot be interrupted. It will light each system in the vehicle (i choose heli's, but you can make up any, just look up for the relevant classnames) with even lapses of time inbetween each one. I left two lapses for the engine and kept it last because it's the only piece of equipment that can keep the helo on the ground till the end and only if it's red :P

place this on the heli/aircraft/vehicle of your choice's init field:

this sethit["motor", 1];this sethit ["mala vrtule",1]; this sethit["velka vrtule",1]; this sethit["elektronika", 1]; _startup = this addAction ["Startup sequence", "startup.sqf","", 0, false, false, "", "(player == (driver _target)"];

Then save a .txt file in your mission folder and change its name in startup.sqf with this in it

if (typeof player != "USMC_Soldier_Pilot") //place the actual classname for the role you decided on your mission

then {

hint "Not a pilot. Go play elsewhere."

};

if (typeof player == "USMC_Soldier_Pilot") then {

_unit = _this select 0;

_delay = 37; //this value is the waiting time in seconds. i set 8 pauses inbetween each update, so 37*8*60= 5 minutes give or take

hint "Startup sequence initiated. Systems to go in 5 minutes"; //set this message with the actual time needed for all systems to be nominal

_unit sethit ["mala vrtule",0.5];

sleep _delay;

_unit sethit["velka vrtule", 0.5];

sleep _delay;

_unit sethit["elektronika", 0.5];

sleep _delay;

_unit sethit ["mala vrtule",0];

sleep _delay;

_unit sethit["velka vrtule", 0];

sleep _delay;

_unit sethit["elektronika", 0];

sleep _delay;

sleep _delay;

_unit sethit["motor", 0];

hint "Startup sequence terminated. Ready to takeoff.";

};

hope it helps :)

Edited by Maffa

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  

×