Jump to content
gc8

does publicVariable work?

Recommended Posts

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×