Difference between revisions of "Custom Papyrus Events"

12 bytes removed ,  12:35, 20 April 2017
m
no edit summary
imported>Qazaaq
(Added to category.)
imported>Qazaaq
m
 
Line 1: Line 1:
=Overview=
[[Category:Papyrus]]
[[Category:Events]]
Custom events allow any script in the game to send an event which any number of scripts can then receive. The receivers have to register with the sender, but the sender doesn't have to know about the receivers or manage them in any way. One way this could be used would be having an actor register to receive an event from a controlling script whenever it enters a location, and unregister when they leave. Then the controller script could send the event, and all actors in that location that register would get it without having to maintain any complicated list or setting up a bunch of aliases.
Custom events allow any script in the game to send an event which any number of scripts can then receive. The receivers have to register with the sender, but the sender doesn't have to know about the receivers or manage them in any way. One way this could be used would be having an actor register to receive an event from a controlling script whenever it enters a location, and unregister when they leave. Then the controller script could send the event, and all actors in that location that register would get it without having to maintain any complicated list or setting up a bunch of aliases.


Line 103: Line 104:
*[[UnregisterForCustomEvent - ScriptObject]]
*[[UnregisterForCustomEvent - ScriptObject]]
*[[Events Reference]]
*[[Events Reference]]
[[Category:Papyrus]]
[[Category:Events]]
Anonymous user