GetClickingObject()

Used in the OnClick event to return the clicking object.

object GetClickingObject();

Description

Use this in a trigger's OnClick event script to get the object that last clicked on it. This is identical to GetEnteringObject.



Version

1.22

Example

// cause a PC that attempts to open a locked door to utter
// some nonsense about requiring a key in a door's OnFailToOpen
// event
void main()
{
    object oPC = GetClickingObject();

    if (GetIsObjectValid(oPC))
        AssignCommand(oPC, SpeakString("I need to find the key..."));
    else
        SpeakString("NO VALID TEMP PC");
}

See Also

functions: GetEnteringObject
categories: Get Data Functions
events: OnClick Event


 author: Ryan Hunt, editor: Charles Feduke, additional contributor(s): Fred Brent
 Send comments on this topic.