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
Cant open door
OPK Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2011
Reputation: 0
#1
Cant open door

I checked trought this script like 250 times, never spotted any mistake. I have watched series of tutorials and searched on forums for solution. Didnot find any working ones, so i decided to make my own post. Also i'm perfectly sure that those names are right, just like i setted them in level editor.


////////////////////////////
// Run first time starting map
void OnStart()
{  
   AddUseItemCallback("", "Superkey", "Superdoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity
{
    SetSwingDoorLocked("Superdoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "Superdoor", 0.0f, false);
    RemoveItem("Superkey");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
04-13-2011, 06:08 AM
Find
nofsky Offline
Senior Member

Posts: 423
Threads: 13
Joined: Sep 2008
Reputation: 1
#2
RE: Cant open door

void UsedKeyOnDoor(string &in asItem, string &in asEntity

Missing )
04-13-2011, 07:24 AM
Find
OPK Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2011
Reputation: 0
#3
RE: Cant open door

Thank you, cant really believe i didnot see it ^^.
04-13-2011, 02:39 PM
Find




Users browsing this thread: 1 Guest(s)