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
Quick Question about level doors.
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Quick Question about level doors.

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_2", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_3", "level_celler_1", "KeyOnLevelDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_2");

}
void KeyOnLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_celler_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_celler_1", 0, false);
RemoveItem("key_3");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}


You can set texts in level editor, level door entity settings. You need to specify category and entry from your language file.

(This post was last modified: 09-06-2011, 01:49 AM by Tanshaydar.)
09-06-2011, 01:48 AM
Website Find


Messages In This Thread
RE: Quick Question about level doors. - by Tanshaydar - 09-06-2011, 01:48 AM



Users browsing this thread: 1 Guest(s)