API:Event Handling

From TheWarWiki

Jump to: navigation, search

WAR API Help

For a list of events, see Event List

The basic syntax for event registration is

RegisterEventHandler(SystemData.Events.EVENT_NAME, "SomeFunction")

This also works:

RegisterEventHandler(SystemData.Events.EVENT_NAME, "SomeNamespace.SomeFunction")

This will then call SomeFunction(...) or SomeNamespace.SomeFunction(...) The arguments that are passed in varies from event to event.

These functions can be called at any time in your lua.

Personal tools