triggerEvent
Function
Server and Client
Online and Offline
void triggerEvent(string eventName, [ Element source = null] The source element to trigger the event for, used in bindEventHandler but not in [[addEventHandler|addEventHandler] ], [ mixed vararg = null ])
Use triggerNetworkEvent for script communication between client and server or vice versa.
Parameters
1) | string | eventName | The name of the event, case-insensitive. |
2) | Element | source | Optional, defaults to null] The source element to trigger the event for, used in bindEventHandler but not in [[addEventHandler|addEventHandler]. . |
3) | mixed | vararg | Optional, defaults to null. Arguments to be sent to scripting function that are bound to the event. |
Return
void | This function doesn't return a value. |
Callbacks
string eventName(CancellableEvent event, vararg ...)
1) | CancellableEvent | event | The event object. |
2) | vararg | ... | The mixed vararg arguments that were sent to triggerEvent. Note that the source element is not forwarded to the callbacks. |
Notes
There aren't any notes for this function.
Examples
There aren't any examples for this function.
Compatibility
There isn't any compatibility information for this function.
Related
Server Related
addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
triggerNetworkEvent
unbindEventHandler
Client Related
addEvent
addEventHandler
bindEventHandler
removeEventHandler
triggerEvent
triggerNetworkEvent
unbindEventHandler