davidoss 550 Posted January 13, 2018 Allready fixed works like charm: private ["_side","_logicCenter","_logicGroup","_hqPapa"]; //createLogic _side = [0,1,2] select ([EAST,WEST,INDEPENDENT] find GVAR_FSIDE); _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _hqPapa = _logicGroup createUnit ["logic", [0,0,0], [], 0, "NONE"]; _hqPapa setVehicleVarName "hq_logic_papa"; hq_logic_papa = _hqPapa; publicVariable "hq_logic_papa"; _hqPapa setVariable ["callsign","STR_A3_CfgHQIdentities_Base_0",false]; _hqPapa setVariable ["side",_side,false]; _hqPapa setVariable ["identity",1,false]; _hqPapa setVariable ["callsigncustom","PAPA BEAR",false]; [_hqPapa] call BIS_fnc_moduleHQ; _logicGroup = createGroup _logicCenter; _hqPapa = _logicGroup createUnit ["logic", [0,0,0], [], 0, "NONE"]; _hqPapa setVehicleVarName "support_hqts"; support_hqts = _hqPapa; publicVariable "support_hqts"; _hqPapa setVariable ["callsign","STR_A3_CfgHQIdentities_Base_0",false]; _hqPapa setVariable ["side",_side,false]; _hqPapa setVariable ["identity",0,false]; _hqPapa setVariable ["callsigncustom","SUPPORT HQ",false]; [_hqPapa] call BIS_fnc_moduleHQ; Share this post Link to post Share on other sites
lordfrith 401 Posted January 19, 2018 I think this might be just what i'm looking for but could you give an example of what it does? is this for changing HQ identities in side chat for example? [west, "HQ"] sideChat "burp"; shows on screen as "CROSSROAD: burp" can this be used to change that? cheers Share this post Link to post Share on other sites
AZCoder 921 Posted January 19, 2018 If you are using the BIS module HQ then yes, in which case you'd have that game logic do the sideChat. 1 Share this post Link to post Share on other sites
davidoss 550 Posted January 19, 2018 Well, the whole idea was to not use any kind of editor objects. There are correct way to use this in MP private ["_side","_logicCenter","_logicGroup","_hqPapa"]; _side = [0,1,2] select ([EAST,WEST,INDEPENDENT] find GVAR_FSIDE); _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _hqPapa = _logicGroup createUnit ["logic", [0,0,0], [], 0, "NONE"]; _hqPapa setVehicleVarName "hq_logic_papa"; hq_logic_papa = _hqPapa; publicVariable "hq_logic_papa"; _hqPapa setVariable ["callsign","STR_A3_CfgHQIdentities_Base_0",true]; _hqPapa setVariable ["side",_side,true]; _hqPapa setVariable ["identity",1,true]; _hqPapa setVariable ["callsigncustom","PAPA-BEAR",true]; 0 = [_hqPapa] remoteExec ["BIS_fnc_moduleHQ", 0, true]; _logicGroup = createGroup _logicCenter; _hqPapa = _logicGroup createUnit ["logic", [0,0,0], [], 0, "NONE"]; _hqPapa setVehicleVarName "support_hqts"; support_hqts = _hqPapa; publicVariable "support_hqts"; _hqPapa setVariable ["callsign","STR_A3_CfgHQIdentities_Base_0",true]; _hqPapa setVariable ["side",_side,true]; _hqPapa setVariable ["identity",0,true]; _hqPapa setVariable ["callsigncustom","SUPPORT-HQ",true]; 0 = [_hqPapa] remoteExec ["BIS_fnc_moduleHQ", 0, true]; this will spawn two modules in game with virtual headquarters identity You can than refer to those using its variables and use for any kind of chats radio etc like this 0 = [hq_logic_papa, "hold_villiage"] remoteExec ["sideRadio", WEST, false]; 0 = [support_hqts, "heli_unresponsive"] remoteExec ["sideRadio", side player, false]; 1 Share this post Link to post Share on other sites
AZCoder 921 Posted January 20, 2018 I did not mean to imply that an editor logic was required, your script already handles that dynamically. Either way works. Share this post Link to post Share on other sites
lordfrith 401 Posted January 24, 2018 (edited) this was just what i needed! i made a wee function to set this up: Spoiler LF_fnc_HQmaker = { //adapted from Davidoss forum post by Lordfrith //[_side, _HQname, _custCall] call LF_fnc_HQmaker; // _side: 1, 2 or 3 for east, west or independent. (possibly 4 for civs?) //_HQname: 1,2or 3 for which HQ to create, more can be added as needed //_HQcallsign: string, what the hq channel is called in chat. i.e. "Overlord" private ["_side","_HQname","_HQcallsign","_logicCenter","_logicGroup","_hqPapa"]; _side = _this select 0; _HQname = _this select 1; _HQcallsign = _this select 2; _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _hqPapa = _logicGroup createUnit ["logic", [0,0,0], [], 0, "NONE"]; switch (_HQname) do { case 1: {_hqPapa setVehicleVarName "LFhomebase"; LFhomebase = _hqPapa; publicVariable "LFhomebase"; }; case 2: {_hqPapa setVehicleVarName "LFairSupt"; LFairSupt = _hqPapa; publicVariable "LFairSupt"; }; case 3: {_hqPapa setVehicleVarName "LFgroundSupt"; LFgroundSupt = _hqPapa; publicVariable "LFgroundSupt"; }; }; _hqPapa setVariable ["callsign","STR_A3_CfgHQIdentities_Base_0",true]; _hqPapa setVariable ["side",_side,true]; _hqPapa setVariable ["identity",1,true]; _hqPapa setVariable ["callsigncustom",_HQcallsign,true]; 0 = [_hqPapa] remoteExec ["BIS_fnc_moduleHQ", 0, true]; }; as you can see i couldn't figure out how to pass the global variable name to create the HQ to the function from its arguments so i went with a 'swich do'. Edited January 24, 2018 by lordfrith i never declared all me variables Share this post Link to post Share on other sites
davidoss 550 Posted January 24, 2018 params [["_side", sideUnknown, [sideUnknown]],["_HQname",0,[0]],["_HQcallsign","",[""]]]; private ["_logicCenter","_logicGroup","_hqPapa"]; 1 Share this post Link to post Share on other sites
lordfrith 401 Posted January 24, 2018 ...hmm ok params, looks like i need to move on from the magic _this wouldn't i still need the 'switch do' for '_HQname' in the function, my idea was that the variable name could be user entered in the function call like so... Quote [1, HQname, "callsign"] call LF_fnc_doesntWork; but i ran into problems here: Quote _hqPapa setVehicleVarName str _HQname; _HQname = _hqPapa; publicVariable str _HQname; i'm sure theres a blindingly obvious reason why that doesn't work Share this post Link to post Share on other sites