GetEventScript(object, int)

From NWN Lexicon
Revision as of 21:32, 17 May 2018 by Squatting Monk (talk | contribs) (OnDeath confirmed to work for PCs)
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Returns the event script for the given object and handler.
string GetEventScript(
    object oObject,
    int nHandler
);

Parameters

oObject
The object to get the event script from
nHandler
An EVENT_SCRIPT_* constant matching the event to get the script from.

Description

Returns the event script for the given object and handler.

Will return "" if unset, the object is invalid, or the object cannot have the requested handler.

Remarks

While this can get creature events from the PC, the only events that actually work on PCs are OnConversation, OnDeath, OnHeartbeat, and OnUserDefined.

Version

1.74.8164

See Also

functions: SetEventScript()
constants: EVENT_SCRIPT_* Constant Group