Syntax: zs.makeevent{prop-list}

Creates a new event or modifies an existing event and returns the Event record. This uses the Lua class syntax of {prop-list} where {prop-list} is a table of property values. Some properties can be set by the index (position in the table), while other properties can be set by name.

The indexed properties are: Event, Value/Script, Class, and Name/ID. So, for example:

a = zs.makeevent{"onevent", "commands", "myclass", "myevent"}

will create an event called "myevent" in the class folder "myclass" with the "commands" as the value/script of the event. This same event could have been created with the syntax:

a = zs.makeevent{event="onevent", value="commands", class="myclass", name="myevent"}

This key=value syntax allows you to set *any* of the properties of the Event object at creation time directly.

Add comment

Login or register to post comments