Returns an event of the type nUserDefinedEventNumber.
- A number used to identify the type of event to signal.
EventUserDefined() is used with the SignalEvent() function to cause the OnUserDefined event to trigger and run the script assigned. Within the OnUserDefined script, nUserDefinedEventNumber can be retrieved using the GetUserDefinedEventNumber() function.
nUserDefinedEventNumber can be one of the standard event numbers (see the object's default OnSpawn script) or a custom number.
EventUserDefined only creates the event. SignalEvent() must still be called to cause the event to be triggered.
The importance of UserEvents is in the ability to execute custom code to deal with unique situations without modifying the default scripts NWN assigns to the events.
author: Brett Lathrope, editor: Jeremy Spilinek