d3lta 10 Posted December 27, 2013 (edited) Hi masters, PublicVariable is failing when I use publicVariable. see: init.sqf: _actionId1 = lidergeral addAction ["<t color='#FF0000'>Falar</t>", { nul= [] execVM "FalarComLider.sqf" } ]; FalarComLider.sqf objtFOXTROT=1; publicVariable "objtFOXTROT"; <-------- don't broadcast to others PC.... What's the problem? obs 1.: I tested on dedicated (arma 3). best regards... D3lta Edited December 27, 2013 by D3lta Share this post Link to post Share on other sites
mikie boy 18 Posted December 27, 2013 make sure each client knows what the variable is prior to being transmitted across the network - (publicVariable); for example - in the init.sqf - you could have if (isnil objtFOXTROT) then {objtFOXTROT = 0}; that way when each client loads in they will have access to the variable objtFOXTROT. Very crude explanation i know...sorry Share this post Link to post Share on other sites
d3lta 10 Posted December 27, 2013 (edited) make sure each client knows what the variable is prior to being transmitted across the network - (publicVariable);for example - in the init.sqf - you could have if (isnil objtFOXTROT) then {objtFOXTROT = 0}; that way when each client loads in they will have access to the variable objtFOXTROT. Very crude explanation i know...sorry Thanks Mikie boy. But "isnil" isn't the problem, I tested. =( Is Arma3 introducing a new role security with addAction and publicvariable? Best regards. Edited December 27, 2013 by D3lta Share this post Link to post Share on other sites
d3lta 10 Posted December 27, 2013 (edited) not solved. Edited December 27, 2013 by D3lta Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 Please, what's wrong with this code? init.sqf task4 = player createSimpleTask ["tskc4"]; task4 setSimpleTaskDescription ["Blah Blah Blah","Zamaks","Zamaks"]; task4 settaskstate "Created"; task4 setSimpleTaskDestination markerpos "obj4"; hand1= leaderSoldier addaction ["Speak","missaook.sqf"]; if (isServer || isDedicated) then { "DisparadorDeEventoGlobal" addPublicVariableEventHandler { localize "SERVER XXXXXXXXXXXXXXXXXXXXXX"; _NomeEvento = _this select 1 select 0; _ValEvento = _this select 1 select 1; DisparadorDeEventoParaCliente = [_NomeEvento,_ValEvento]; publicVariable "DisparadorDeEventoParaCliente"; }; } else { "DisparadorDeEventoParaCliente" addPublicVariableEventHandler { _params = _this select 1; _ne = _params select 0; hintSilent "MEH MEH MEH MEH"; }; }; missaook.sqf <------ FIRED BY ADDACTION DisparadorDeEventoGlobal=["facaAlgo","1"]; publicVariableServer "DisparadorDeEventoGlobal"; Here, using the speak menu on leader, don't show nothing, no hintSilent, no log info... :butbut: Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 The PVEH will not fire on the machine that executed the broadcast command. So if you're testing on your own machine, then you will not receive what's being broadcasted via the PVEH. Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 The PVEH will not fire on the machine that executed the broadcast command. So if you're testing on your own machine, then you will not receive what's being broadcasted via the PVEH. Hi I'm testing in dedserver, not preview mode. Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 Did you add a debug hint to the server PVEH? ---------- Post added at 18:30 ---------- Previous post was at 18:29 ---------- IE; hint localize "SERVER XXXXXXXXXXXXXXXXXXXXXX"; or hint "SERVER XXXXXXXXXXXXXXXXXXXXXX"; Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 hint localize "SERVER XXXXXXXXXXXXXXXXXXXXXX"; Don't have HINT in my code, only localize that writes to arma's log. ---------- Post added at 03:40 AM ---------- Previous post was at 03:39 AM ---------- Obs. Only HintSilent can to fire to display on client PC. Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 (edited) Obs. Only HintSilent can to fire to display on client PC. Not quite sure what you're getting at. Even if hint is local, it should be broadcasted to clients because it's in a PVEH. In any case, good luck with your script. Edited December 28, 2013 by Iceman77 Share this post Link to post Share on other sites
mariodu62 5 Posted December 28, 2013 try with bis_fnc_mp... Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 (edited) He shouldn't need to use bis_fnc_mp though. I thought code within the PVEH should broadcast ? Edited December 28, 2013 by Iceman77 Share this post Link to post Share on other sites
mariodu62 5 Posted December 28, 2013 (edited) He shouldn't need to use bis_fnc_mp though. I thought code within the PVEH should broadcast ? Of course but the MP function has been developped for doing the job and less publicvariable decrease network consumption Edited December 28, 2013 by Mariodu62 Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 Gotcha. I thought you meant he needed to use bis_fnc_mp within the pveh. Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 Not quite sure what you're getting at. Even if hint is local, it should be broadcasted to clients because it's in a PVEH. In any case, good luck with your script. publicVariable "DisparadorDeEventoParaCliente"; and "DisparadorDeEventoParaCliente" addPublicVariableEventHandler does not broadcast to all clients? ---------- Post added at 11:28 AM ---------- Previous post was at 11:26 AM ---------- try with bis_fnc_mp... hummm.. I will try. Share this post Link to post Share on other sites
mikie boy 18 Posted December 28, 2013 Not sure what the problem is but.... "FOCK_GHint" addPublicVariableEventHandler { private ["_GHint"]; _GHint = _this select 1; hint format["%1", _GHint]; }; and // FOCK_GHint = "Hello everyone on the server except me!"; publicVariable "FOCK_GHint"; works fine - the only person who this doesn't see the message is the player/machine that executed the broadcast command. maybe you need to explain more about what your trying to do or what code you are using. Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 (edited) Not sure what the problem is but.... "FOCK_GHint" addPublicVariableEventHandler { private ["_GHint"]; _GHint = _this select 1; hint format["%1", _GHint]; }; and // FOCK_GHint = "Hello everyone on the server except me!"; publicVariable "FOCK_GHint"; works fine - the only person who this doesn't see the message is the player/machine that executed the broadcast command. maybe you need to explain more about what your trying to do or what code you are using. Exactly... That said, the OP could just use bis_fnc_mp though and do away with PVEH's. Edited December 28, 2013 by Iceman77 Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 Not sure what the problem is but.... "FOCK_GHint" addPublicVariableEventHandler { private ["_GHint"]; _GHint = _this select 1; hint format["%1", _GHint]; }; and // FOCK_GHint = "Hello everyone on the server except me!"; publicVariable "FOCK_GHint"; works fine - the only person who this doesn't see the message is the player/machine that executed the broadcast command. maybe you need to explain more about what your trying to do or what code you are using. The main problem is using addPublicVariableEventHandler with addaction. When I use with radio trigger , no problem. Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2013 (edited) But why not just use bis_fnc_mp? Delta_fnc_message = { [{hint "MEH MEH MEH MEH";},"BIS_fnc_spawn",true,false] spawn BIS_fnc_MP; // do stuff }; player addAction ["Broadcast Message", {call Delta_fnc_message;}, [], 1, false, true, "", "_target == lidergeral"]; Edited December 28, 2013 by Iceman77 Share this post Link to post Share on other sites
d3lta 10 Posted December 28, 2013 But why not just use bis_fnc_mp? Delta_fnc_message = { [{hint "MEH MEH MEH MEH";},"BIS_fnc_spawn",true,false] spawn BIS_fnc_MP; // do stuff }; player addAction ["Broadcast Message", {call Delta_fnc_message;}, [], 1, false, true, "", "_target == lidergeral"]; YEAHHHHHH, I tested here now and bis_fnc_mp run's fine. THANKS A LOT Mariodu62, Iceman77 and Mikie Boy. Best regards!! :D:D:D Share this post Link to post Share on other sites