gc8 970 Posted November 15, 2017 Hi I'm trying to use publicvariable command to send variable to all clients but the event handler never gets triggered, what am I doing wrong? sleep 0.1; "myPubVar" addPublicVariableEventHandler { player sidechat format["--- Testing myPubVar: %1", _this]; // Never prints diag_log format["--- Testing myPubVar: %1", _this]; // Never prints }; player sidechat "Testing"; // prints myPubVar = [123, "456", true]; publicVariable "myPubVar"; I'm running this in MP. thx! Share this post Link to post Share on other sites
Tajin 348 Posted November 15, 2017 https://community.bistudio.com/wiki/addPublicVariableEventHandler did you read the notes on it ? Share this post Link to post Share on other sites
gc8 970 Posted November 15, 2017 1 hour ago, Tajin said: https://community.bistudio.com/wiki/addPublicVariableEventHandler did you read the notes on it ? did now, thanks! So I understand it will only work on dedicated server, correct? Or maybe in client as well when connected to dedicated server? hmmm. Share this post Link to post Share on other sites
pierremgi 4739 Posted November 15, 2017 try with publicVariableServer Share this post Link to post Share on other sites
Muzzleflash 111 Posted November 15, 2017 gc8, the machine on which you use publicVariable will not run any handlers. 1 Share this post Link to post Share on other sites