Jump to content
Sign in to follow this  
neven

BIS_fnc_spawnGroup custom init for units?

Recommended Posts

Hi everyone. I've been testing the BIS_fnc_spawnGroup function. It's fantastic!

I'm wanting the units I call in to have a custom loadout. Is it possible to assign an init to each soldier in the script below? I'm unclear on how the syntax would work, or if their is a better way.

_TERMINAL_DEFENCE = [getmarkerpos "DEFENCE", WEST, ["B_recon_JTAC_F","B_recon_LAT_F","B_recon_TL_F","B_recon_medic_F","B_recon_exp_F","B_spotter_F","B_sniper_F","B_HeavyGunner_F","B_soldier_AT_F","B_spotter_F"],[],[4,1,1,1,1,1,1,1,1,1],[],[],[],355] call BIS_fnc_spawnGroup;

Thanks for any help.

Share this post


Link to post
Share on other sites
Is it possible to assign an init...

This ability was disabled in Arma 3 for security reasons.

Share this post


Link to post
Share on other sites
This ability was disabled in Arma 3 for security reasons.

Whoa. Okay. :(

Thanks for the quick response.

Share this post


Link to post
Share on other sites

BIS_fnc_spawnGroup returns the group so you can do with them what ever you like. e.g

_TERMINAL_DEFENCE = [getmarkerpos "DEFENCE", WEST, ["B_recon_JTAC_F","B_recon_LAT_F","B_recon_TL_F","B_recon_medic_F","B_recon_exp_F","B_spotter_F","B_sniper_F","B_HeavyGunner_F","B_soldier_AT_F","B_spotter_F"],[],[4,1,1,1,1,1,1,1,1,1],[],[],[],355] call BIS_fnc_spawnGroup;
{
switch ( typeOf _x ) do {
	case ( "B_recon_JTAC_F" ) : {
		_x forceAddUniform "U_B_GhillieSuit";
	};
	case ( "B_recon_medic_F" ) : {
		_x addBackpackGlobal "B_FieldPack_cbr_Medic";
	};
};

_x linkItem "ItemMap";
}forEach units _TERMINAL_DEFENCE;

Just as a quick example, all B_recon_JTAC_F within the group would have a ghillie suit the medic would get a field backpack and all members would get a map in their map slot.

  • Like 1

Share this post


Link to post
Share on other sites
BIS_fnc_spawnGroup returns the group so you can do with them what ever you like. e.g...

That is heavy-cool man. Works like a charm. Thanks so much for the example. :)

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  

×