Jump to content
Sign in to follow this  
Meatball0311

Using High Command module, but want subordinate groups to move in one formation?

Recommended Posts

I am using the High Command module and I have 3 fireteams synchronized to one High Command- subordinate game logic

arma22009-12-2623-24-14-96.jpg

Is it possible to combine them into one squad (for movement in a squad formation) like this

arma22009-12-2703-54-15-95.jpg

and then to un-combine them back into their fireteams?

I know that this is possible, because Chain Of Command had a command engine for ArmA1 that would give you control like this. Also they had some really 'realistic' formations. Anyone have any suggestions?

Ok I figured out how to combine my three fireteam subordinate groups (SPT_ONE (Assault Team), SPT_TWO (Support Team), SPT_THREE (Security Team)) into one squad sized subordinate group that I could control with the High Command module. I did this so I could move and command them as one squad(ie. to move in a squad formation). I wanted to create a squad staggard column formation in the order of SPT_TWO (Support Team), SPT_ONE (Assault Team), SPT_THREE (Security Team). I did this by giving subordinate group SPT_TWO a "MOVE" waypoint with setWayPointFormation "STAG COLUMN", and SPT_ONE a "JOIN" waypoint with setWayPointFormation "STAG COLUMN" synchronized to [sPT_TWO, 1]. Then I gave SPT_THREE a "JOIN" waypoint with setWayPointFormation "STAG COLUMN" synchronized to [sPT_ONE, 1] and that resulted in all teams combining into group SPT_TWO.

; ****************************************************************

; Script file for Armed Assault

; Created by: TODO: Author Name

; [this] exec "High_Command\stag_column.sqs"

; ****************************************************************

; Combining group SPT_TWO, SPT_ONE, SPT_THREE into group SPT_TWO

_pos = position SPT_R2

_posX = _pos select 0

_posY = _pos select 1

_posZ = _pos select 2

_wp1SPT_TWO = SPT_TWO addWaypoint [position SPT_R2, 0]

[sPT_TWO, 1] setWPPos position SPT_R2

[sPT_TWO, 1] setWaypointType "MOVE"

[sPT_TWO, 1] setWaypointSpeed "FULL"

[sPT_TWO, 1] setWaypointFormation "STAG COLUMN"

_wp1SPT_ONE = SPT_ONE addWaypoint [position SPT_R2, 0]

[sPT_ONE, 1] setWPPos position SPT_R2

[sPT_ONE, 1] setWaypointType "JOIN"

[sPT_ONE, 1] setWaypointSpeed "FULL"

[sPT_ONE, 1] setWaypointFormation "STAG COLUMN"

[sPT_ONE, 1] synchronizeWaypoint [ [sPT_TWO, 1] ]

_wp1SPT_THREE = SPT_THREE addWaypoint [position SPT_R1, 0]

[sPT_THREE, 1] setWPPos position SPT_R1

[sPT_THREE, 1] setWaypointType "JOIN"

[sPT_THREE, 1] setWaypointSpeed "FULL"

[sPT_THREE, 1] setWaypointFormation "STAG COLUMN"

[sPT_THREE, 1] synchronizeWaypoint [ [sPT_TWO, 1] ]

The question now is how would I seperate them back into their original subordinate groups?

Edited by Meatball0311

Share this post


Link to post
Share on other sites

Did you check out the HC scripts from the module?

Maybe that two codes will help you to get them back as subordinate groups:

modules.pbo -> HC -> data -> scripts -> HC.sqf

line 50 - 73:

//--- Synchronization
waituntil {{typeof _x != "HighCommandSubordinate"} count (synchronizedObjects _logic) > 0 || _logic == bis_hc_mainscope};
_possibleLeaders = synchronizedObjects _logic;
_groupColors = ["teammain","teamgreen","teamblue","teamyellow"];
_sublogics = [];
for "_i" from 0 to (count _possibleLeaders - 1) do {
_element = _possibleLeaders select _i;
if (typeof _element == "HighCommandSubordinate") then {
	_sublogics = _sublogics + [_element];
	if (isnil {_element getvariable "color"}) then {
		_color = if (_i >= count _groupColors) then {"teammain"} else {_groupColors select _i};
		_element setvariable ["color",_color];
	};
};
};
_possibleLeaders = _possibleLeaders - _sublogics;
_logic setvariable ["sublogics",_sublogics];
if (count _possibleLeaders > 1) then {textLogFormat ["Log: [High Command] WARNING! More than one commanders assigned - %1",_possibleleaders]};
_leader = _possibleLeaders select 0;
_leader setvariable ["BIS_HC_scope",_logic,true];


//--- Default leader
_leader setvariable ["hcdefaultcommander",true];

line 122 - 158:

//--- Automatic group assigning - Synchronized
if (count _sublogics > 0 && !_addAllGroups) then {
//if (isnull(hcleader group _leader)) then {_leader HCsetgroup [group _leader,""]};
_linkedLogic = synchronizedObjects _logic;
if (count _linkedLogic > 1) then {
	{
		if (typeof _x == "HighCommandSubordinate") then {
			_subordinate = _x;
			_linkedSubordinate = synchronizedObjects _subordinate;
			{
				if !(_x iskindof "logic") then {
					_group = group _x;
					_groupColor = _subordinate getvariable "color";
					[_leader,"MARTA_REVEAL",[_group],false,true] call BIS_fnc_variableSpaceAdd;
					_leader HCsetgroup [_group,"",_groupColor];
				};
			} foreach _linkedSubordinate;
		};
	} foreach _linkedlogic;
};
} else {

//--- Automatic group assigning - All
//if (isnull(hcleader group _leader)) then {_leader HCsetgroup [group _leader,""]};

_groups = allgroups;//_logicMARTA getvariable "allgroups";
{
	//--- No HCO defined yet
	_grp = _x;
	if (isnull hcleader _grp) then {
		if (side player == side _grp && _addAllGroups) then {
			[player,"MARTA_REVEAL",[_x],false,true] call BIS_fnc_variableSpaceAdd;
			player HCsetgroup [_grp,""];
		};
	};
} foreach _groups;
};

Share this post


Link to post
Share on other sites

I believe I may have figured out how to combine your High Command-subordinate groups into one subordinate group so you can move them as one group in a squad staggard column. Then the ability to seperate them back into their own original subordinate groups.

I created two "addActions"... one named "FORM SQUAD" and the other one "FORM TEAMS"

My first script which is named "High_Command\squad.sqs" is this:

; ; ************************************************** **************

; Script file for Armed Assault

; Created by: Meatball0311

; [this] exec "High_Command\squad.sqs"

; This is nearly perfect except the fact that I want to add more detail to it

; however this will do the job of combining the 3 subordinate fireteams into one

; squad.

; SPT_Actual addAction ["FORM SQUAD", "High_Command\squad.sqs"]

; ************************************************** **************

; creating waypoints for the three groups

;"MOVE" waypoint for group SPT_TWO which will be the 1st fireteam in the squad formation.

_wp1SPT_TWO = SPT_TWO addWaypoint [position SPT_R2, 0]

[sPT_TWO, 1] setWPPos position SPT_R2

[sPT_TWO, 1] setWaypointType "MOVE"

[sPT_TWO, 1] setWaypointSpeed "FULL"

[sPT_TWO, 1] setWaypointFormation "STAG COLUMN"

;"JOIN" waypoint for group SPT_ONE which will be the middle fireteam in the squad formation.

_wp1SPT_ONE = SPT_ONE addWaypoint [position SPT_R2, 0]

[sPT_ONE, 1] setWPPos position SPT_R2

[sPT_ONE, 1] setWaypointType "JOIN"

[sPT_ONE, 1] setWaypointSpeed "FULL"

[sPT_ONE, 1] setWaypointFormation "STAG COLUMN"

;Synchronizing SPT_ONE "JOIN" waypoint to SPT_TWO "MOVE" waypoint.

[sPT_ONE, 1] synchronizeWaypoint [ [sPT_TWO, 1] ]

;"JOIN" waypoint for group SPT_THREE which will be the rear fireteam in squad formation.

_wp1SPT_THREE = SPT_THREE addWaypoint [position SPT_R1, 0]

[sPT_THREE, 1] setWPPos position SPT_R1

[sPT_THREE, 1] setWaypointType "JOIN"

[sPT_THREE, 1] setWaypointSpeed "FULL"

[sPT_THREE, 1] setWaypointFormation "STAG COLUMN"

;Synchronizing SPT_THREE "JOIN" waypoint to SPT_TWO "MOVE" waypoint.

[sPT_THREE, 1] synchronizeWaypoint [ [sPT_TWO, 1] ]

then this is to seperate back into original 3 subordinate fireteams

; ************************************************** **************

; Script file for Armed Assault 2

; Created by: Meatball0311

;SPT_Actual addAction ["FORM SQUAD", "High_Command\teams.sqs"]

;This will break the squad down to original 3 subordinate fireteams

; ************************************************** **************

SPT_Actual hcRemoveGroup SPT_TWO

SPT_ONE = createGroup West

SPT_ONE selectLeader SPT_R1

[sPT_R1] join SPT_ONE

[sPT_AR1] join SPT_R1

[sPT_TL1] join SPT_R1

[sPT_AA1] join SPT_R1

SPT_Actual hcSetGroup [sPT_ONE]

SPT_TWO = createGroup West

SPT_TWO selectLeader SPT_R2

[sPT_R2] join SPT_TWO

[sPT_AR2] join SPT_R2

[sPT_TL2] join SPT_R2

[sPT_AA2] join SPT_R2

SPT_Actual hcSetGroup [sPT_TWO]

SPT_THREE = createGroup West

SPT_THREE selectLeader SPT_SR3

[sPT_SR3] join SPT_THREE

[sPT_AG3] join SPT_SR3

[sPT_MG3] join SPT_SR3

[sPT_SAR3] join SPT_SR3

SPT_Actual hcSetGroup [sPT_THREE]

These scripts will do the job, however I personally would like to add a few more things to them. If you have any suggestions, please let me know. Thanks for your time!

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  

×