OnClick
This event appears on triggers and placeables. The script attached to this event fires when a trigger is entered by a PC, or when the placeable is clicked on by the player using the left mouse button.
Function(s)
- GetPlaceableLastClickedBy() called from a placeable's OnClick event script returns the PC who clicked on the placeable. This function only returns a valid result when called from a placeable's OnClick event script.
- GetClickingObject can be used for a triggers OnClick event. The function is identical to GetEnteringObject so either can be used.
Remarks
Most types of area transitions use this event (although a trigger that is setup as the "Area Transition" type can make use of the wizard to do so).
If a transition target is set and there is no script to fire it will fire NW_G0_Transition by default.
For placeables, the event is triggered immediately as soon as the placeable is clicked if the placeable is usable (ie GetUseableFlag is TRUE). This is in contrast to the OnUsed placeable event which doesn't fire until the clicking player is first made to walk over to the placeable.
See Also
| functions: |
author: NWN Lexicon Group, editor: Mistress, Kookoo, contributor: Axe Murderer