Event
Description:
Creates a definition for an action that emits event.
Signature:
Event: function(
name: string,
param?: string --[[""]]
): ActionDef
Usage:
-- Get this event by register event from the action performing node.
node:slot("EventName", function(param: string)
print("EventName triggered with param", param)
end)
node:perform(Sequence(
Delay(3),
Event("EventName", "Hello")
))
Parameters:
Parameter | Type | Description |
---|---|---|
name | string | The name of the event to be triggered. |
param | string | The parameter to pass to the event. (default: "") |
Returns:
Return Type | Description |
---|---|
ActionDef | The created ActionDef . |