OnClick

From NWN Lexicon
Jump to: navigation, search

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

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