OnFailToOpen

The script attached to this event fires when an attempt to open a door fails which could signal another event to spawn creatures to investigate the noise, notify the opening that they need a key or the door cannot be opened by normal means, or a variety of other things.


Trigger

A creature failing to open a door, due to it being locked somehow.


Function(s)

GetClickingObject() will return the object which tried to open the door.


Example

// example by Fred Brent
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

Objects with Events | Door
functions: GetClickingObject


 Send comments on this topic.