1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
EventList
=========
An EventList is an [event](/engine/event) that triggers multiple events when triggered.
Factory
-------
#### Events.EventList
`Events.EventList(list)`
Spawns an EventList.
*Arguments*
* `list`: [Array](/reference/array) object. A list containing zero or more events.
*Returns*
A new EventList that triggers the specified events at once, in the order they have been listed.
*Example*
```
// This is a level setup object. Make sure to link it in your .lev file!
using SurgeEngine.Level;
using SurgeEngine.Events.EventList;
using SurgeEngine.Events.FunctionEvent;
object "My Level Setup"
{
fun constructor()
{
Level.setup({
"Event Trigger 1": {
"onTrigger": EventList([
FunctionEvent("Print").withArgument("We're triggering"),
FunctionEvent("Print").withArgument("multiple events"),
FunctionEvent("Print").withArgument("at the same time!")
])
}
});
}
}
```
Functions
---------
#### call
`call()`
Triggers the event.
|