Template _grpCIV group markers

Post Reply
User avatar
Jim
Posts: 90
Joined: Wed Jul 13, 2016 10:54 am
Contact:

Template _grpCIV group markers

Post by Jim »

I've been working on a mission that has a small IDAP part. To give them map markers I have combed the template files and added the following

from f > group markers > f_setLocGroupMkr.sqf

Code: Select all

// INCLUDE GROUP LIST
private ["_grpBLU", "_grpOPF", "_grpIND", "_grpCIV"];
_grpBLU = []; _grpOPF = []; _grpIND = []; _grpCIV = [];
#include "..\..\mission\groups.sqf";

...

	// MARKERS: CIVILIAN
	case civilian: {
		if (count _grpCIV > 0) then {
			{
				_x spawn f_fnc_localGroupMarker;
			} forEach _grpCIV;
		};
	};
from f > JIP > f_teleportOption.sqf

Code: Select all

	switch (side (group player)) do {
		case west		: { _flagType = "Flag_Blue_F"; 	_flagMarker = "respawn_west"; };
		case east		: { _flagType = "Flag_Red_F"; 	_flagMarker = "respawn_east"; };
		case resistance	: { _flagType = "Flag_Green_F"; _flagMarker = "respawn_guerrila"; };
		case civilian	: { _flagType = "Flag_White_F"; _flagMarker = "respawn_civilian"; };
		
		
in f > misc > f_debug.sqf


					case 7: {
						if ({side _x == civilian} count (playableUnits + switchableUnits) == 0) then {
							_mkr = createMarkerLocal[format["%1_marker",_module],getPos _module];
							_mkr setMarkerShapeLocal "ICON";
							_mkr setMarkerColorLocal "ColorOrange";
							_mkr setMarkerSizeLocal [0.8,0.8];
							_mkr setMarkerTypeLocal "mil_dot";
							["f_debug.sqf",format["<font color='#0080FF'><marker name='%2'>Task %1</marker></font color> has owner assigned as CIVILIAN but no playable units.",_moduleID,_mkr]] call f_fnc_logIssue;
							diag_log text format["[F3] WARNING (f_debug.sqf): Task ID %1 has owner assigned as CIVILIAN but no playable units!",_moduleID];
						};
					};
from f > misc > f_vas.sqf (which seams very similar to JIP?)

Code: Select all

switch (side (group player)) do {
	case west		: { _flagType = "Flag_Blue_F"; 	_flagMarker = "respawn_west"; };
	case east		: { _flagType = "Flag_Red_F"; 	_flagMarker = "respawn_east"; };
	case resistance	: { _flagType = "Flag_Green_F"; _flagMarker = "respawn_guerrila"; };
	case civilian	: { _flagType = "Flag_White_F"; _flagMarker = "respawn_civilian"; };
};
from f > radios > custom_init.sqf

Code: Select all

if isServer then {
	private _sidePlayerGroups = []; private _grpBLU = []; private _grpOPF = []; private _grpIND = []; private _grpCIV = [];
		
	#include "..\..\mission\groups.sqf";

	f_var_chWest = []; f_var_chEast = [];  f_var_chGuer = []; f_var_chCiv = [];
	
	
		missionNamespace setVariable [format["f_var_ch%1",_chSide], _tempArr, true];
	} forEach [
			[_grpBLU, west],
			[_grpOPF, east],
			[_grpIND, independent],
			[_grpCIV, civilian]
		];
From f > setGroupID

Code: Select all

// INCLUDE GROUP LIST
private _grpBLU = []; private _grpOPF = []; private _grpIND = []; private _grpCIV = []; private _grpList = []; 
private _sleepCount = 0;
#include "..\..\mission\groups.sqf";


// SET GROUP IDS
// Execute setGroupID Function for all factions
{([west] + _x) call _f_fnc_setGroupID} forEach _grpBLU;
{([east] + _x) call _f_fnc_setGroupID} forEach _grpOPF;
{([independent] + _x) call _f_fnc_setGroupID} forEach _grpIND;
{([civilian] + _x) call _f_fnc_setGroupID} forEach _grpCIV;
From mission > groups.sqf

Code: Select all

_grpCIV = [
	["GrpCIV_CO","CO","b_hq","CO",_yellow],
	["GrpCIV_DC","JTAC","b_hq","J",_yellow],
	["GrpCIV_ASL","Alpha","b_inf","A",_red],
	["GrpCIV_BSL","Bravo","b_inf","B",_blue],
	["GrpCIV_CSL","Charlie","b_inf","C",_green],
	["GrpCIV_DSL","Delta","b_inf","D",_orange],
	["GrpCIV_ESL","Echo","b_inf","E",_black],
	["GrpCIV_MMG1","MMG","b_support","MMG1",_orange],
	["GrpCIV_HMG1","HMG","b_support","HMG1",_orange],
	["GrpCIV_MAT1","MAT","b_motor_inf","MAT1",_orange],
	["GrpCIV_HAT1","HAT","b_motor_inf","HAT1",_orange],
	["GrpCIV_MTR1","MTR","b_mortar","MTR1",_orange],
	["GrpCIV_MSAM1","MSAM","b_motor_inf","MSAM1",_orange],
	["GrpCIV_HSAM1","HSAM","b_motor_inf","HSAM1",_orange],
	["GrpCIV_ST1","ST","b_recon","ST1",_orange],
	["GrpCIV_DT1","DT","b_recon","DT1",_orange],
	["GrpCIV_ENG1","ENG","b_maint","ENG1",_orange],
	["GrpCIV_IFV1","IFV1","b_mech_inf","IFV1",_red],
	["GrpCIV_IFV2","IFV2","b_mech_inf","IFV2",_blue],
	["GrpCIV_IFV3","IFV3","b_mech_inf","IFV3",_green],
	["GrpCIV_IFV4","IFV4","b_mech_inf","IFV4",_orange],
	["GrpCIV_IFV5","IFV5","b_mech_inf","IFV5",_black],
	["GrpCIV_IFV6","IFV6","b_mech_inf","IFV6",_white],
	["GrpCIV_TNK1","Thunder","b_armor","THU",_red],
	["GrpCIV_TH1","Vector1","b_air","V1",_red],
	["GrpCIV_TH2","Vector2","b_air","V2",_blue],
	["GrpCIV_TH3","Vector3","b_air","V3",_green],
	["GrpCIV_TH4","Vector4","b_air","V4",_orange],
	["GrpCIV_AH1","Hawk","b_air","HWK",_red]
	// Always make sure there's no comma after the last entry!
];
Which works quite nicely!

I've also made a VR template of a composite IDAP and armed civilian group with suitable transport options. It's on Test Server 1 - template grpCIV v01.VR.pbo If its suitable to be folded into the Z1 template please feel free to do so - or pass it on to the F3 guys
User avatar
2600K
Posts: 173
Joined: Sun Jan 17, 2016 5:21 pm
Contact:

Re: Template _grpCIV group markers

Post by 2600K »

Just noticed this; thanks for taking the time to correct some of the code. These changes have been added into the templates.

I'll convert the IDAP kit into a gear template and add them as playable units into the template mission in the near future.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests