From NWN Lexicon
Revision as of 06:22, 11 February 2021 by Tinygiant (talk | contribs) (Remarks)
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.

The script attached to this event fires when EnterTargetingMode is activated.


When EnterTargetingMode is used and the player either selects a target or manually exits targeting mode.



Note: Currently you must use SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET, "script_name"). You cannot set this in the module properties yet.

There is no default script for this event, and therefore the default behaviour for this event is to do nothing at all.

Once set however and EnterTargetingMode is called the player can target an appropriate thing or location. This event will fire if the player targets an object or manually exits targeting mode.

This then can do something related to what occured; some ideas:

  • Conversation option to "pick an item to upgrade" allows the player to open the inventory next to the conversation, and select an item from it
  • A speakstring (hidden/whispered) of a player is captured, and causes this event to fire, eg; to have a visual effect appear at the chosen location
  • Another event, such as using an item or spell (eg; "Use Item (On Self)"), activates this to target the effects of said item

To do multi-select, or once a target is checked and is invalid, you could easily have this event call EnterTargetingMode again meaning it fires again.

Known Bugs




See Also


EnterTargetingMode GetLastPlayerToSelectTarget GetTargetingModeSelectedPosition GetTargetingModeSelectedObject