Monsada 10 Posted April 2, 2010 Hi, I need to raise an event on server that does each local machine execute an script when event is raised. How can I do it without cba? Share this post Link to post Share on other sites
loyalguard 15 Posted April 3, 2010 (edited) Define a global variable on the server that says the event has not happened: if {!isServer} exithWith {}; MON_myEvent = false; Also add a public variable event handler to the clients the look for changes to MON_myEvent. if {isServer} exithWith {}; "MON_myEvent" addPublicVariableEventHandler {...}; Instead of the ... insert whatever code you want to run. When the event happens change MON_myEvent to true and use the publicVariable command to broadcast it to the clients: MON_myEvent = true; publicVariable "MON_myEvent"; When broadcasted, the event handler will trigger and run the code only on the clients. Checkout addPublicVariableEventHandler on the biki for arguments and other aspects. Edited April 3, 2010 by Loyalguard remove Double-copy Share this post Link to post Share on other sites
Monsada 10 Posted April 3, 2010 Fantastic!! thanks a lot Share this post Link to post Share on other sites