Frictional Games Forum (read-only)

Full Version: Door Message Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a locked door in my level. I make it say something when its locked. When its unlocked, and you hold the door down to open and close the door, it still says the message! I really don't want it to say it anymore when the door is unlocked. Can anyone fix this? This is the code in the script to make the door say the message when locked:

Code:
void InteractClosedDoor(string &in asEntity)
{
    AddTimer("doorm", 0.5f, "TimerDoorMessage");
}
void TimerDoorMessage(string &in asTimer)
{
    SetMessage("Messages", "Locked_Door_9", 0);
}

Please help. Sad
Code:
void InteractClosedDoor(string &in asEntity)
{
    if(GetSwingDoorLocked("NAME OF YOUR DOOR") == true)
    AddTimer("doorm", 0.5f, "TimerDoorMessage");
}
void TimerDoorMessage(string &in asTimer)
{
    SetMessage("Messages", "Locked_Door_9", 0);
}
(10-22-2010, 09:39 PM)Pandemoneus Wrote: [ -> ]
Code:
void InteractClosedDoor(string &in asEntity)
{
    if(GetSwingDoorLocked("NAME OF YOUR DOOR") == true)
    AddTimer("doorm", 0.5f, "TimerDoorMessage");
}
void TimerDoorMessage(string &in asTimer)
{
    SetMessage("Messages", "Locked_Door_9", 0);
}

Thanks! This works!