FridayNightFight / FNF

The mission framework for Friday Night Fight, a team-based PvP Arma 3 event happening every Friday.
https://www.fridaynightfight.org
BSD 3-Clause "New" or "Revised" License
12 stars 8 forks source link

automated takeoff script #116

Closed indig0fox closed 5 months ago

indig0fox commented 3 years ago

For fixed wing when present, allow scroll wheel auto takeoff option to avoid issues at mission start

martin7125 commented 3 years ago

This is what I used for WW2 when this was used. Not what it would look like for proper template integration, but feel free to use pieces.

this addAction ["<t color='#FF0000'>Takeoff<\t>", {
phx_action = true;
[] spawn {
_v = vehicle player;
_v engineOn true;
_v lock true;

hint "Takeoff in 10 seconds, don't exit the vehicle";
sleep 10;
hint "";
_v setpos [getpos _v select 0, getpos _v select 1, 500];

_dir = direction _v;
_speed = 100;
_v setVelocity [
    sin _dir * _speed,
    cos _dir * _speed,
    0
];
_v lock false;
};
}, nil, 0.1, false, true, "", "_this == driver _target && !phx_safetyEnabled && isNil 'phx_action'"];