EVENT_SCRIPT_* Constant Group

From NWN Lexicon
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.
Events that objects have scripts for. Used by GetEventScript() and SetEventScript()

There are four main cases of other scripts that can fire:

Constants

Constant Value Description
EVENT_SCRIPT_MODULE_ON_HEARTBEAT 3000 Module OnHeartbeat Event
EVENT_SCRIPT_MODULE_ON_USER_DEFINED_EVENT 3001 Module OnUserDefined Event
EVENT_SCRIPT_MODULE_ON_MODULE_LOAD 3002 Module OnModuleLoad Event
EVENT_SCRIPT_MODULE_ON_MODULE_START 3003 Module OnModuleStart Event - except this doesn't even get fired by the game even if you register the event or add it to module.ifo. Use OnModuleLoad instead.
EVENT_SCRIPT_MODULE_ON_CLIENT_ENTER 3004 Module OnClientEnter Event
EVENT_SCRIPT_MODULE_ON_CLIENT_EXIT 3005 Module OnClientLeave Event
EVENT_SCRIPT_MODULE_ON_ACTIVATE_ITEM 3006 Module OnActivateItem Event
EVENT_SCRIPT_MODULE_ON_ACQUIRE_ITEM 3007 Module OnAcquireItem Event
EVENT_SCRIPT_MODULE_ON_LOSE_ITEM 3008 Module OnUnAcquireItem Event
EVENT_SCRIPT_MODULE_ON_PLAYER_DEATH 3009 Module OnPlayerDeath Event
EVENT_SCRIPT_MODULE_ON_PLAYER_DYING 3010 Module OnPlayerDying Event
EVENT_SCRIPT_MODULE_ON_RESPAWN_BUTTON_PRESSED 3011 Module OnPlayerRespawn Event
EVENT_SCRIPT_MODULE_ON_PLAYER_REST 3012 Module OnPlayerRest Event
EVENT_SCRIPT_MODULE_ON_PLAYER_LEVEL_UP 3013 Module OnPlayerLevelUp Event
EVENT_SCRIPT_MODULE_ON_PLAYER_CANCEL_CUTSCENE 3014 Module OnCutsceneAbort Event
EVENT_SCRIPT_MODULE_ON_EQUIP_ITEM 3015 Module OnPlayerEquipItem Event
EVENT_SCRIPT_MODULE_ON_UNEQUIP_ITEM 3016 Module OnPlayerUnequipItem Event
EVENT_SCRIPT_MODULE_ON_PLAYER_CHAT 3017 Module OnPlayerChat Event
EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET 3018 Module OnPlayerTarget Event. Added in 1.80.8193.14.
EVENT_SCRIPT_MODULE_ON_PLAYER_GUIEVENT 3019 Module OnPlayerGuiEvent Event. Added in 1.85.8193.30.
EVENT_SCRIPT_MODULE_ON_PLAYER_TILE_ACTION 3020 Module OnPlayerTileAction Event. Added in 1.85.8193.30.
EVENT_SCRIPT_MODULE_ON_NUI_EVENT 3021 Fires when NuiCreate or NuiCreateFromResRef are called, when a watched bind is somehow changed (by way of NuiSetBindWatch), or any player-derived action found on this page: NuiGetEventType. Added in 1.85.8193.31.
EVENT_SCRIPT_AREA_ON_HEARTBEAT 4000 Area OnHeartbeat Event
EVENT_SCRIPT_AREA_ON_USER_DEFINED_EVENT 4001 Area OnUserDefined Event
EVENT_SCRIPT_AREA_ON_ENTER 4002 Area OnEnter Event
EVENT_SCRIPT_AREA_ON_EXIT 4003 Area OnExit Event
EVENT_SCRIPT_AREAOFEFFECT_ON_HEARTBEAT 11000 Area of Effect OnEnter Event
EVENT_SCRIPT_AREAOFEFFECT_ON_USER_DEFINED_EVENT 11001 Area of Effect OnUserDefined Event
EVENT_SCRIPT_AREAOFEFFECT_ON_OBJECT_ENTER 11002 Area of Effect OnEnter Event
EVENT_SCRIPT_AREAOFEFFECT_ON_OBJECT_EXIT 11003 Area of Effect OnExit Event
EVENT_SCRIPT_CREATURE_ON_HEARTBEAT 5000 Creature OnHeartbeat Event
EVENT_SCRIPT_CREATURE_ON_NOTICE 5001 Creature OnPerception Event
EVENT_SCRIPT_CREATURE_ON_SPELLCASTAT 5002 Creature OnSpellCastAt Event
EVENT_SCRIPT_CREATURE_ON_MELEE_ATTACKED 5003 Creature OnPhysicalAttacked Event
EVENT_SCRIPT_CREATURE_ON_DAMAGED 5004 Creature OnDamaged Event
EVENT_SCRIPT_CREATURE_ON_DISTURBED 5005 Creature OnDisturbed Event
EVENT_SCRIPT_CREATURE_ON_END_COMBATROUND 5006 Creature OnCombatRoundEnd Event
EVENT_SCRIPT_CREATURE_ON_DIALOGUE 5007 Creature OnConversation Event
EVENT_SCRIPT_CREATURE_ON_SPAWN_IN 5008 Creature OnSpawn Event
EVENT_SCRIPT_CREATURE_ON_RESTED 5009 Creature OnRested Event
EVENT_SCRIPT_CREATURE_ON_DEATH 5010 Creature OnDeath Event
EVENT_SCRIPT_CREATURE_ON_USER_DEFINED_EVENT 5011 Creature OnUserDefined Event
EVENT_SCRIPT_CREATURE_ON_BLOCKED_BY_DOOR 5012 Creature OnBlocked Event
EVENT_SCRIPT_TRIGGER_ON_HEARTBEAT 7000 Trigger OnHeartbeat Event
EVENT_SCRIPT_TRIGGER_ON_OBJECT_ENTER 7001 Trigger OnEnter Event
EVENT_SCRIPT_TRIGGER_ON_OBJECT_EXIT 7002 Trigger OnExit Event
EVENT_SCRIPT_TRIGGER_ON_USER_DEFINED_EVENT 7003 Trigger OnUserDefined Event
EVENT_SCRIPT_TRIGGER_ON_TRAPTRIGGERED 7004 Trigger Trap OnTrapTriggered Event
EVENT_SCRIPT_TRIGGER_ON_DISARMED 7005 Trigger Trap OnDisarm Event
EVENT_SCRIPT_TRIGGER_ON_CLICKED 7006 Trigger OnClick Event
EVENT_SCRIPT_PLACEABLE_ON_CLOSED 9000 Placeable OnClose Event
EVENT_SCRIPT_PLACEABLE_ON_DAMAGED 9001 Placeable OnDamaged Event
EVENT_SCRIPT_PLACEABLE_ON_DEATH 9002 Placeable OnDeath Event
EVENT_SCRIPT_PLACEABLE_ON_DISARM 9003 Placeable Trap OnDisarm Event
EVENT_SCRIPT_PLACEABLE_ON_HEARTBEAT 9004 Placeable OnHeartbeat Event
EVENT_SCRIPT_PLACEABLE_ON_INVENTORYDISTURBED 9005 Placeable OnDisturbed Event
EVENT_SCRIPT_PLACEABLE_ON_LOCK 9006 Placeable OnLock Event
EVENT_SCRIPT_PLACEABLE_ON_MELEEATTACKED 9007 Placeable OnPhysicalAttacked Event
EVENT_SCRIPT_PLACEABLE_ON_OPEN 9008 Placeable OnOpen Event
EVENT_SCRIPT_PLACEABLE_ON_SPELLCASTAT 9009 Placeable OnSpellCastAt Event
EVENT_SCRIPT_PLACEABLE_ON_TRAPTRIGGERED 9010 Placeable OnTrapTriggered Event
EVENT_SCRIPT_PLACEABLE_ON_UNLOCK 9011 Placeable OnUnlock Event
EVENT_SCRIPT_PLACEABLE_ON_USED 9012 Placeable OnUsed Event
EVENT_SCRIPT_PLACEABLE_ON_USER_DEFINED_EVENT 9013 Placeable OnUserDefined Event
EVENT_SCRIPT_PLACEABLE_ON_DIALOGUE 9014 Placeable OnConversation Event
EVENT_SCRIPT_PLACEABLE_ON_LEFT_CLICK 9015 Placeable OnClick Event
EVENT_SCRIPT_DOOR_ON_OPEN 10000 Door OnOpen Event
EVENT_SCRIPT_DOOR_ON_CLOSE 10001 Door OnClose Event
EVENT_SCRIPT_DOOR_ON_DAMAGE 10002 Door OnDamaged Event
EVENT_SCRIPT_DOOR_ON_DEATH 10003 Door OnDeath Event
EVENT_SCRIPT_DOOR_ON_DISARM 10004 Door Trap OnDisarm Event
EVENT_SCRIPT_DOOR_ON_HEARTBEAT 10005 Door OnHeartbeat Event
EVENT_SCRIPT_DOOR_ON_LOCK 10006 Door OnLock Event
EVENT_SCRIPT_DOOR_ON_MELEE_ATTACKED 10007 Door OnPhysicalAttacked Event
EVENT_SCRIPT_DOOR_ON_SPELLCASTAT 10008 Door OnSpellCastAt Event
EVENT_SCRIPT_DOOR_ON_TRAPTRIGGERED 10009 Door Trap OnTrapTriggered Event
EVENT_SCRIPT_DOOR_ON_UNLOCK 10010 Door OnUnlock Event
EVENT_SCRIPT_DOOR_ON_USERDEFINED 10011 Door OnUserDefined Event
EVENT_SCRIPT_DOOR_ON_CLICKED 10012 Door OnClick Event
EVENT_SCRIPT_DOOR_ON_DIALOGUE 10013 Door OnConversation Event
EVENT_SCRIPT_DOOR_ON_FAIL_TO_OPEN 10014 Door OnFailToOpen Event
EVENT_SCRIPT_ENCOUNTER_ON_OBJECT_ENTER 13000 Encounter OnEnter Event
EVENT_SCRIPT_ENCOUNTER_ON_OBJECT_EXIT 13001 Encounter OnExit Event
EVENT_SCRIPT_ENCOUNTER_ON_HEARTBEAT 13002 Encounter OnHeartbeat Event
EVENT_SCRIPT_ENCOUNTER_ON_ENCOUNTER_EXHAUSTED 13003 Encounter OnExhausted Event
EVENT_SCRIPT_ENCOUNTER_ON_USER_DEFINED_EVENT 13004 Encounter OnUserDefined Event
EVENT_SCRIPT_STORE_ON_OPEN 14000 Store OnOpenStore Event
EVENT_SCRIPT_STORE_ON_CLOSE 14001 Store OnStoreClosed Event

Version

This constants group was added in 1.74.8164 of NWN:EE.

This constants group was updated in 1.80.8193.14 of NWN:EE. Added EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET.

This constants group was updated in 1.85.8193.30 of NWN:EE. Added EVENT_SCRIPT_MODULE_ON_PLAYER_GUIEVENT and EVENT_SCRIPT_MODULE_ON_PLAYER_TILE_ACTION.

This constants group was updated in 1.85.8193.31 of NWN:EE. Added EVENT_SCRIPT_MODULE_ON_NUI_EVENT.

See Also

functions: GetEventScript(), SetEventScript()