Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message on locked doors[SOLVED]
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#2
RE: Message on locked doors

This is a ctrl-c, ctrl-v from my map script:

Spoiler below!

void OpenLevelDoor(string &in asItem, string &in asEntity)
{
CompleteQuest("Passage", "The_Passage");
SetLevelDoorLocked("level_wood_2", false);
PlayGuiSound("unlock_door.snt", 1.0f);
SetLocalVarInt("LevelLockedX", 1);
}

void LevelDoorLocked(string &in asEntity)
{
if(GetLocalVarInt("LevelLockedX")==0)
{
SetMessage("TheHall", "LevelLocked", 0);
PlaySoundAtEntity("", "locked_door.ogg", "level_wood_2", 0.0f, false);
return;
}
}

It displays the message when variable "LevelLockedX" is set to 0 (which it is by default).
When using a key on it however, that variable is set to 1. Thus interaction after unlocking will no longer display the message.

Note that this is for a leveldoor and not a swingdoor, so if you are using a swingdoor replace the "SetLevelDoorLocked("level_wood_2", false);" with the swingdoor command.

[Image: mZiYnxe.png]


(This post was last modified: 05-16-2011, 06:22 PM by Acies.)
05-16-2011, 06:22 PM
Find


Messages In This Thread
Message on locked doors[SOLVED] - by Greven - 05-16-2011, 06:14 PM
RE: Message on locked doors - by Acies - 05-16-2011, 06:22 PM
RE: Message on locked doors - by Greven - 05-16-2011, 08:11 PM
RE: Message on locked doors - by Acies - 05-16-2011, 09:14 PM
RE: Message on locked doors - by Russ Money - 05-16-2011, 09:24 PM
RE: Message on locked doors - by dragonlordsd - 05-17-2011, 02:36 AM



Users browsing this thread: 1 Guest(s)