Gaming
 

EventUserDefined

From NWNWiki

EventUserDefined() is a NWScript function that creates an OnUserDefined event to be sent to an object. This function only creates the event; to actually trigger the event, this function's return value must be passed to SignalEvent().

[edit] Definition

event EventUserDefined(int nUserDefinedEventNumber)

int nUserDefinedEventNumber
Specifies the type of user-defined event being triggered.

The script handling the OnUserDefined event can retrieve nUserDefinedEventNumber with GetUserDefinedEventNumber(). The meaning of the event number is completely determined by the person writing the scripts. However, the numbers 1000 through 1011, 1510, and 1511 should be avoided for custom events as these numbers are used by BioWare to indicate the standard events when those events are requested to signal a user-defined event. See SetSpawnInCondition().