Difference between revisions of "GetEventScript"

From NWN Lexicon
Jump to: navigation, search
(Initial page creation)
 
(Other events can work on PCs as well)
Line 22: Line 22:
  
 
===Remarks===
 
===Remarks===
While this can get creature events from the PC, the only event that actually work on PCs is OnHeartbeat.
+
While this can get creature events from the PC, the only events that actually work on PCs are [[OnConversation]], [[OnHeartbeat]], and [[OnUserDefined]].
  
 
===Version===
 
===Version===

Revision as of 02:58, 18 March 2018

Returns the event script for the given object and handler.

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.
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, OnHeartbeat, and OnUserDefined.

Version

1.74.8164

See Also

functions: SetEventScript()
constants: EVENT_SCRIPT_* Constant Group