Jump to content
Sign in to follow this  
jwllorens

Event Handler locality

Recommended Posts

I am confused by event handlers in multiplayer.  The wiki says:

 

Object event handler, always executed on the computer where it was added.

 

 

and 

 

MP notes: "Killed" and "Hit" eventhandlers are executed where given unit is local.
All other eventhandlers are executed on all computers.
Events added by addEventHandler may be different on each computer.

 

 

 

So if I add an event handler to a unit with addEventHandler on computer A, and that event fires (global event like "Fired"), will computer B execute the code that computer A added (assuming addEvenentHandler was not called on computer B explicitly)?

 

Will computer B be able to use removeEventHandler to remove the event handler added by computer A?

 

 

I am hoping the event handler is local and the code it runs is local too (even if the code has commands that have global effect, I am hoping it is only processed by the local machine).  That would be way easier to keep track of.  

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
Sign in to follow this  

×