Jump to content
xXPinkFloyd92Xx

Changing a faction from BLUFOR to Independent (Script)

Recommended Posts

Hello,
I need to change the faction of some Blufor Units that are spawned into the mission using scrips. I want to make these units (who are default Blufor) spawn as Independent Faction Units (Green). Currently, they spawn as Blufor as they're supposed to but I want them to be on the Independent faction. I know you can achieve this with an (Independent) unit and setting the unit as their leader. Is there a better way to achieve this setup? Any help is appreciated.
Thank you.

 

Share this post


Link to post
Share on other sites

I'm an absolute beginner, but i think this would do it?

 

[getPos aPos, east, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup

Just replace the soldiers with whatever you want (soldiers listed in there are "TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"....)

 

Add as many as you want in this format ["Grenadier", "Machinegunner", "Marksman", "AT Soldier", "XYZ Soldier"]

 

The more you add the bigger the group will be and the more types you add, the more diverse the group will be.

 

*aPos = name of marker

  • Like 2

Share this post


Link to post
Share on other sites

Spawn a BLUFOR unit as Independent:

_independentGrp = createGroup independent;
_unit = _independentGrp createUnit ["B_Soldier_F", getPos player, [], 0, "FORM"];
[_unit] joinSilent _independentGrp;

 

Spawn a group of BLUFOR units as Independent:

_independentGrp = [getPos player, independent, (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSquad")] call BIS_fnc_spawnGroup; // BUS_InfSquad is the CfgGroups config entry for your desired group

 

Switch an existing group of BLUFOR units to Independent:

_bluforGrp = group TAG_bluforTL // TAG_bluforTL is the team leader of the blufor squad you spawned (can also be any other unit from the group)
_independentGrp = createGroup [independent, true];
(units _bluforGrp) joinSilent _independentGrp;

 

Switch several existing ungrouped BLUFOR units to Independent:

_independentGrp = createGroup independent;
[TAG_bluforUnit_1, TAG_bluforUnit_2, TAG_bluforUnit_3] joinSilent _independentGrp;

 

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Rok Stuhne said:

*aPos = name of marker

 

In that case, you must use getMarkerPos. Also, marker names are strings, so they must be in double-quotes:

[getMarkerPos "aPos", east, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup

 

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, Harzach said:

 

In that case, you must use getMarkerPos. Also, marker names are strings, so they must be in double-quotes:


[getMarkerPos "aPos", east, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup

 

Like i said, absolute beginner. 😁😇

  • Haha 1

Share this post


Link to post
Share on other sites
38 minutes ago, Rok Stuhne said:

 

Like i said, absolute beginner. 😁😇

 

We all are, at the beginning!

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

×