HowTo/Events: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 5: Line 5:
An event system is also called the observer pattern.
An event system is also called the observer pattern.


A scripting function can be bound to an event name.<br>
A scripting function can be bound to an event, by using the event name with [[addEventHandler|addEventHandler]] or [[bindEventHandler|bindEventHandler]].<br>
When an event name is invoked, all scripting functions that are bound to that event name are called.
When an event is invoked, all scripting functions that are bound to that event are called.
 
Event names are not case-sensitive, OnPlayerJoined is the same as onPlayerJoined.


==Example==
==Example==
6,833

edits