Kolmain 6 Posted December 13, 2012 I've been reading posts and came across this: http://community.bistudio.com/wiki/High_Command However, I've been reading alot of MP issues... Will it be an issue to add and remove groups to a player after he respawns? Will I need to recreate the entire chain? Is it even possible? Share this post Link to post Share on other sites
riouken 15 Posted December 13, 2012 You will lose your HC after respawn, buy you can re-sync the unit back with the HC Module with this: http://community.bistudio.com/wiki/synchronizeObjectsAdd You can create groups and add them to HC on the fly: http://community.bistudio.com/wiki/hcSetGroup In this script I am creating groups on the fly and adding them to HC for the commander.(Its not full stand alone, as there is a dialog and other parts that go with it, but you can see how it would work.) // Opcom Interface , By Oliver 15thMEU(SOC). if (!isServer) exitWith {}; switch (true) do { case (grpslb == 0) : {group1 = [grp1pos, east, ["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group1];}; case (grpslb == 1) : { group2 = [grp2pos, east, ["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AT_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group2];}; case (grpslb == 2) : { group3 = [grp3pos, east, ["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group3]; group3veh = [[grp3pos select 0, (grp3pos select 1) - 5,.5], east, ["BTR40_MG_TK_INS_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group3veh]; _nObject = nearestObject [grp3pos, "Car"]; { _x action ["getInCargo", _nObject]} forEach (units group3); _wpveh = group3veh addWaypoint [grp3ulpos, 0]; [group3veh, 1] setWaypointType "TR UNLOAD"; [group3, grp3ulpos, 120] call bis_fnc_taskPatrol; [group3veh, grp3ulpos, 120] call bis_fnc_taskPatrol; }; case (grpslb == 3) : { group4 = [grp4pos, east, ["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AR_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_AT_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group4]; group4veh = [[grp4pos select 0, (grp4pos select 1) - 5,.5], east, ["GAZ_Vodnik"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group4veh]; _nObject2 = nearestObject [grp4pos, "Car"]; { _x action ["getInCargo", _nObject2]} forEach (units group4); _wpveh = group4veh addWaypoint [grp4ulpos, 0]; [group4veh, 1] setWaypointType "TR UNLOAD"; [group4, grp4ulpos, 120] call bis_fnc_taskPatrol; [group4veh, grp4ulpos, 120] call bis_fnc_taskPatrol; }; case (grpslb == 4) : { group5 = [grp5pos, east, ["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_MG_EP1","TK_INS_Soldier_MG_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group5];}; case (grpslb == 5) : { group6 = [[grp6pos select 0, grp6pos select 1,.5], east, ["UAZ_MG_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group6];};// UAZ MG case (grpslb == 6) : { group7 = [[grp7pos select 0, grp7pos select 1,.5], east, ["UAZ_AGS30_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group7];};// UAZ AGS 30 case (grpslb == 7) : { group8 = [[grp8pos select 0, grp8pos select 1,.5], east, ["LandRover_MG_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group8];};// LAndrover MG case (grpslb == 8) : { group9 = [[grp9pos select 0, grp9pos select 1,.5], east, ["LandRover_SPG9_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group9];};// LAndrover SPG9 case (grpslb == 9) : { group10 = [[grp10pos select 0, grp10pos select 1,.5], east, ["BTR40_MG_TK_INS_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group10];};// BTR 40 case (grpslb == 10) : { group11 = [grp11pos, east, ["BMP2_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group11];};// BMP2 case (grpslb == 11) : { group12 = [grp12pos, east, ["ZSU_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group12];};// ZSU case (grpslb == 12) : { group13 = [[grp13pos select 0, grp13pos select 1,.5], east, ["BRDM2_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group13];};// BDRM2 case (grpslb == 13) : { group14 = [[grp14pos select 0, grp14pos select 1,.5], east, ["BTR60_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group14];};// BTR60 case (grpslb == 14) : { group15 = [[grp15pos select 0, grp15pos select 1,.5], east, ["ACE_BTR70_TK"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group15];};// BTR70 case (grpslb == 15) : { group16 = [grp16pos, east, ["M113_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group16];};// M113 case (grpslb == 16) : { group17 = [grp17pos, east, ["T34_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group17];};// T34 case (grpslb == 17) : { group18 = [grp18pos, east, ["T55_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group18];};// T55 case (grpslb == 18) : { group19 = [grp19pos, east, ["T72_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group19];};// T72 case (grpslb == 19) : { group20 = [[grp20pos select 0, grp20pos select 1,.5], east, ["Ural_ZU23_TK_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group20];};// Ural ZU 23 case (grpslb == 20) : { group21 = createGroup east; [[grp21pos select 0, grp21pos select 1,100], 0, "Mi24_D_TK_EP1", group21] call bis_fnc_spawnvehicle;opcom hcSetGroup [group21];};// MI24 case (grpslb == 21) : { group22 = createGroup east; [[grp22pos select 0, grp22pos select 1,400], 0, "Su25_TK_EP1", group22] call bis_fnc_spawnvehicle;opcom hcSetGroup [group22];};// Su25 case (grpslb == 22) : { group23 = [grp23pos, east, ["TK_Soldier_Night_1_EP1","TK_Soldier_Night_1_EP1", "TK_Soldier_Night_1_EP1","TK_Soldier_Night_1_E P1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group23];}; // Night Fire Team case (grpslb == 23) : { group24 = [grp24pos, east, ["TK_Soldier_AA_EP1","TK_Soldier_B_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group24];}; // AA Team case (grpslb == 24) : { group25 = [grp25pos, east, ["TK_Soldier_HAT_EP1","TK_Soldier_AAT_EP1","TK_Soldier_B_EP1"]] call BIS_fnc_spawnGroup;opcom hcSetGroup [group25];}; // AT Team }; re_inforce_start = false; Here are some of the other HC commands: http://community.bistudio.com/wiki/hcAllGroups http://community.bistudio.com/wiki/hcGroupParams http://community.bistudio.com/wiki/hcLeader http://community.bistudio.com/wiki/hcRemoveAllGroups http://community.bistudio.com/wiki/hcRemoveGroup http://community.bistudio.com/wiki/hcSelected http://community.bistudio.com/wiki/hcSelectGroup http://community.bistudio.com/wiki/hcSetGroup http://community.bistudio.com/wiki/hcShowBar http://community.bistudio.com/wiki/hcShownBar Share this post Link to post Share on other sites