While researching this Rocket Launch thing i came across a C130 Version called Credible Sport.
So I simply had to make a very crude version of the reverse thing.
Since I'm not a professional don't expect too much, but it looks fun at night time
replace the jato.sqf code with this
/*-------------------------------------------------------------------
very simple JATO script v0.9 by Sabre[Dust]
(Jet Assisted Take Off - actually Rocket Assisted Take Off)
put this in the init line of your aircraft:
nul = [this] execVM "jato.sqf"
or even better: use a trigger. This will allow you to easily reload the JATO System.
Make a trigger, set it to <Activation Bluefor, Present, Repeatedly> and put this in its <Condition> line:
{typeof _x == "C130J"} count thislist >0
Adjust the type of C130 you are using.
In its <On Act> field put this:
_xhandle = [(thislist select 0)] execVM "jato.sqf"; hint "JATO ready";
Have Fun
-------------------------------------------------------------------*/
_aircraft = _this select 0;
/* if using a trigger to load the system, it's probably better to remove the action before adding it to prevent loading multiple actions*/
_aircraft removeAction jato;
_aircraft removeAction jasl;
jato = _aircraft addaction ["JATO","jatoaction.sqf"];
jasl = _aircraft addaction ["JASL","jaslaction.sqf"];
and here is my jasl script (jet assisted short landing - it's my working title atm)
/*-------------------------------------------------------------------
very simple JASL script v0.9 by Sabre_D
-------------------------------------------------------------------*/
_aircraft = _this select 0;
/*------------------------------------------------------
check if crew or pilot is trying to access script
use the following expression for human players only:
if(player != driver _aircraft) then {
for human players and AI use:
if(isNull driver _aircraft) then {
------------------------------------------------------*/
if(player != driver _aircraft) then {
_aircraft vehiclechat "Take your hands off the JASL System crewman! It's not a toy.";
} else {
// remove the action and initialise a few variables
_aircraft removeAction jasl;
_aircraft vehiclechat "JASL System ignition";
_speed = -5; // play with this to increase the power of the deceleration
_rockettype = "M_Maverick_AT"; // object that gets attached, default "M_Maverick_AT"
_boostcycle = 0;
while {_boostcycle < 11 } do {
sleep 0.3; // interval at which the boost happens
_boostcycle = _boostcycle+1;
_vel = velocity _aircraft; // velocity of aircraft at current time
_dir = direction _aircraft; // vector of aircraft at current time
// deceleration happens here
_aircraft setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2)];
if (_boostcycle == 1) then {
// next step is attaching our _rockets
retrorocket1 = _rockettype createVehicle position _aircraft;
retrorocket2 = _rockettype createVehicle position _aircraft;
retrorocket3 = _rockettype createVehicle position _aircraft;
retrorocket4 = _rockettype createVehicle position _aircraft;
retrorocket5 = _rockettype createVehicle position _aircraft;
retrorocket6 = _rockettype createVehicle position _aircraft;
retrorocket7 = _rockettype createVehicle position _aircraft;
retrorocket8 = _rockettype createVehicle position _aircraft;
retrorocket1 attachTo [_aircraft,[1.5,9,-2.0]];
retrorocket1 setDir 200;
retrorocket2 attachTo [_aircraft,[-1.5,9,-2.0]];
retrorocket2 setDir 160;
retrorocket3 attachTo [_aircraft,[1.7,9,-2.4]];
retrorocket3 setDir 200;
retrorocket4 attachTo [_aircraft,[-1.7,9,-2.4]];
retrorocket4 setDir 160;
retrorocket5 attachTo [_aircraft,[1.9,9,-2.8]];
retrorocket5 setDir 200;
retrorocket6 attachTo [_aircraft,[-1.9,9,-2.8]];
retrorocket6 setDir 160;
retrorocket7 attachTo [_aircraft,[2.28,-0.1,-3.65]];
retrorocket7 setVectorDirAndUp [[-0.4,0.3,0.7],[0.6,0.7,0.3]];
retrorocket8 attachTo [_aircraft,[-2.28,-0.1,-3.65]];
retrorocket8 setVectorDirAndUp [[0.4,0.3,0.7],[0.6,0.7,0.3]];
// ... and _smoke generators
retrosmoke1 = "ARTY_smokeShellWhite" createVehicle position _aircraft;
retrosmoke2 = "smokeshell" createVehicle position _aircraft;
retrosmoke3 = "smokeshell" createVehicle position _aircraft;
retrosmoke1 attachTo [_aircraft,[0,0,-3]];
retrosmoke2 attachTo [_aircraft,[1.7,10.5,-2.4]];
retrosmoke3 attachTo [_aircraft,[-1.7,10.5,-2.4]];
};
};
sleep 2.0;
// clean up the last set of _rockets before they explode
_aircraft vehiclechat "JASL System dropped";
deleteVehicle retrorocket1;
deleteVehicle retrorocket2;
deleteVehicle retrorocket3;
deleteVehicle retrorocket4;
deleteVehicle retrorocket5;
deleteVehicle retrorocket6;
deleteVehicle retrorocket7;
deleteVehicle retrorocket8;
sleep 1.0;
deleteVehicle retrosmoke1;
deleteVehicle retrosmoke2;
deleteVehicle retrosmoke3;
};
All of the above and this were tested in multiplayer environment.
If 1 player and 1 AI use it at the same time it can get messy. I am not sure how to fix this reliably yet. Not 100% sure what happens if 2 players use it at the same time in it's current state.
Also works in single player as far as i can tell.
Let me know what you think of it,
This post was edited by SabreD (2014-02-18 21:29, ago)