Jump to content
Sign in to follow this  
dulix11

HALO jump with gear?

Recommended Posts

I'm making a mission in which a bunch of guys parachute down from a helicopter.

So far I've used the "guy1 action ["eject", heli1"]; for the units to jump, but I have a problem:

The units cannot carry a backpack and a parachute, so the amount of supplies they can bring is limited. Is there a way to spawn a crate or something and have that drop down with them?

Share this post


Link to post
Share on other sites

Quick and dirty:

if ( isDedicated ) exitWith {};
waitUntil { !( isNull player ) && { ( isTouchingGround player ) } };
removeBackPackGlobal player;
player addBackpackGlobal "B_AssaultPack_khk";

Or maybe just give your units the desired backpacks, name a group member guy1, the helo myHelo and..

INIT.SQF

// IF THE GROUP'S NOT ALREADY ASSIGNED AS (IN)CARGO (GROUPED IN THE EDITOR)
{
_x assignAsCargo myHelo;
_x moveIncargo myHelo;
} foreach units (group guy1);

PARADROP.SQF

/*
- STORE THE ORIGINAL ASSIGNED CARGO COUNT (NUMBER)
- ITERATE THROUGH THE VEHICLE'S ASSIGNED CARGO, UNASSIGN AND EJECT EACH IN ONE SECOND INTERVALS
- CREATE A PARACHUTE ALONG WITH EACH UNIT AND ATTACH IT TO THE UNIT. DETATCH AND MOVE THE UNIT INTO THE PARACHUTE ("DRIVER")
- CREATE A CRATE AND PARACHUTE TO PARACHUTE DOWN IF THE MAGIC _FOREACHINDEX VARIABLE EQUALS THE ORIGINAL CARGO COUNT (NUMBER)
*/

_cargoCount = count ( assignedCargo ( vehicle guy1 ) );

{
private ["_chute"];
_x disableCollisionWith ( vehicle _x );
unAssignVehicle _x; 
_x action ["eject", vehicle _x]; 
_chute = createVehicle ["Steerable_Parachute_F", getPos _x, [], 0, "CAN_COLLIDE"];
_chute attachTo [_x,[0,0,0]];
detach _chute;
_x moveIndriver _chute;
 sleep 1;
if (_forEachIndex == _cargoCount - 1) then {
	private ["_chute", "_crate"];
	_chute = createVehicle ["B_Parachute_02_F", getPos _x, [], 0, "NONE"];
	_crate = createVehicle ["Box_NATO_Wps_F", getPos _chute, [], 0, "NONE"];
	_crate attachTo [_chute, [0, 0, -1.3]];
	 waitUntil { ( getPos _crate select 2 ) < 0.5 || { ( isNull _chute ) } };
       detach _crate;
};
} forEach assignedCargo ( vehicle guy1 );

Edited by Iceman77

Share this post


Link to post
Share on other sites

Or just do it the easy way...

Stick this in your init.sqf*

waituntil {!(IsNull (findDisplay 46))};  _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 57) then {
if (!(isTouchingGround player) and (vehicle player == player)) then {
[] spawn {player switchCamera 'EXTERNAL';Player SwitchMove 'AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon';addCamShake [4, 2, 20];sleep 0.7;playSound3D ['@SCS\Sound\Parachute.ogg', Player, false, GetPosASL Player,5, 1, 250];titleText ['', 'White IN', 0.6];addCamShake [2, 2, 10];chute = createVehicle ['Steerable_Parachute_F', position Player,[],0,'Fly'];chute setPos position player;player moveIndriver chute; chute allowDamage false;};   
};
}"];

Basically what this does is for ANY player that is not touching the ground and THAT player is NOT in a vehicle, switch to the freefall animation. When the player presses the space bar, spawn a parachute, at the player, and move player into it.

He keeps his backpack etc. When he lands parchute is replaced by the original backpack he jumped with. Simples..

For the ammocrate create a radio trigger activation once and sync it to a player. Put this in the ON ACT:

hint "Cargo Deployed";cargo = "B_supplyCrate_F" createVehicle getpos player;cargo setPos [getPos player select 0, getPos [player select 1, 200];[objnull, cargo] call BIS_fnc_curatorobjectedited;

This will allow the player synchronised to the radio trigger, to call in an ammodrop on his location once. You can change the Supply crate to the type you need.

*Credit for the stupidly brilliant and simple halodrop goes to ThunderBolt91 from ArmaHolic forums.

Share this post


Link to post
Share on other sites

I could have posted a link to my own simple paradrop script but I was just blown away the stupidly simple example posted by ThunderBolt91.

Share this post


Link to post
Share on other sites

Ya I was just giving you hell. ;)

Pretty nifty little doo dad there! How does it coordinate with the Ai paradropping?. Ahh nvm, player variable.

---------- Post added at 11:30 ---------- Previous post was at 11:28 ----------

Be cool to see one this simple for AIs / mp! Atm the ai's like "Where's my space bar at!?" LOL.

Edited by Iceman77

Share this post


Link to post
Share on other sites

BTW Iceman, in your example I'd stick in a

_chute allowdamage false;

Something to do with exploding parachutes. (See my Simple ParaDrop thread for further details)

Share this post


Link to post
Share on other sites
Okay will do. Exploding parachutes doesn't sound too good.
See this post.
Very cool, quick question, I was testing this and noticed sometimes units explode upon hitting the ground, like artillery. See this screenshot.

Any way to fix this? Has pretty high priority for me!

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  

×