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
Can't get unlock door with key code to work?
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#6
RE: Can't get unlock door with key code to work?

(11-12-2012, 02:35 PM)beecake Wrote: Also where did you ut this line: AddUseItemCallback("", "key5", "water_door", "UsedKeyOnDoor5", true); ?


You did put it in OnStart() right?
Yes... There's nothing wrong with the names either I've checked it a lot of times I've even copy pasted old codes and changed the names and yet it wont work Sad

Heres the entire code for the level


void Onstart()
{
AddUseItemCallback("", "key5", "water_door", "UsedKeyOnDoor5", true);
}

void UsedKeyOnDoor5(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("water_door", false, true);
PlaySoundAtEntity("", "unlock_door", "water_door", 0, false);
RemoveItem("key5");
}

void DoorLockedPlayer2(string &in entity)

{
if(GetSwingDoorLocked("metal_1") == true)
{

SetMessage("Messages", "msgname2", 0);

}
}



void OnEnter()
{
}

void OnLeave()
{
}

Does anyone see something that can cause this problem? I just can't figure it out -.-

(This post was last modified: 11-13-2012, 11:02 AM by Storfigge.)
11-13-2012, 10:52 AM
Find


Messages In This Thread
RE: Can't get unlock door with key code to work? - by Storfigge - 11-13-2012, 10:52 AM



Users browsing this thread: 1 Guest(s)