Difference between revisions of "OnClick"

From NWN Lexicon
Jump to: navigation, search
(Remarks)
Line 13: Line 13:
 
====Remarks====
 
====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).<br /><br /> For placeables, the event is triggered immediately as soon as the placeable is clicked. This is in contrast to the [[ OnUsed | OnUsed ]] placeable event which doesn't fire until the clicking player is first made to walk over to the placeable.
+
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).
  
<br />
+
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. This is in contrast to the [[ OnUsed | OnUsed ]] placeable event which doesn't fire until the clicking player is first made to walk over to the placeable.
  
 
====See Also====
 
====See Also====

Revision as of 19:14, 5 July 2020

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.


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. 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: 

GetPlaceableLastClickedBy()


author: NWN Lexicon Group, editor: Mistress, Kookoo, contributor: Axe Murderer