Difference between revisions of "GetEventScript"

From NWN Lexicon
Jump to: navigation, search
(OnDeath confirmed to work for PCs)
Line 21: Line 21:
  
 
===Remarks===
 
===Remarks===
While this can get creature events from the PC, the only events that actually work on PCs are [[OnConversation]], [[OnHeartbeat]], and [[OnUserDefined]].
+
While this can get creature events from the PC, the only events that actually work on PCs are [[OnConversation]], [[OnDeath]], [[OnHeartbeat]], and [[OnUserDefined]].
  
 
===Version===
 
===Version===

Revision as of 21:32, 17 May 2018

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