Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
jcae2798

Supply Crate

Recommended Posts

Sorry for the dumb simple question. When using the support module, is there a way to change the type of crate it sends? I know we can runa script om INIT, but i wanted to choose a specific crate it drops (NATO Cargonet Crate).

Thanks

Share this post


Link to post
Share on other sites

Thanks. if i'm reading it correctly you cannot change the box itself but can change the ammo in cargo with INIT codes. Oh well thanks anyways :)

Share this post


Link to post
Share on other sites

If that's the case then do this.

Supply Drop Module Crate Init:

_this execVM "newCrate.sqf";

newCrate.sqf

private ["_side","_parachute","_crateType","_newCrate"];

_side = getNumber (configFile >> "CfgVehicles" >> typeOf _this >> "Side");

_parachute = attachedTo _this;
detach _this;
deleteVehicle _this;

_crateType = switch _side do {
case 0:{"O_CargONet_01_ammo_F";};
case 1:{"B_CargoNet_01_ammo_F";};
case 2:{"I_CargoNet_01_ammo_F";};
default {"B_CargoNet_01_ammo_F";};
};

_newCrate = createVehicle [_crateType, [0,0,0], [], 0, "CAN_COLLIDE"];
_newCrate attachTo [_parachute, [0, 0, -1.3]];

Edited by Iceman77
Added side ID and switch statement. Cleaned up the code.

Share this post


Link to post
Share on other sites

Awesomeness Iceman, that worked like a charm. Thanks man

Share this post


Link to post
Share on other sites

No worries. Though I could have swore the supply module had a crate type parameter.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×