The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Cant open door - by OPK - 04-13-2011, 06:08 AM
RE: Cant open door - by nofsky - 04-13-2011, 07:24 AM
RE: Cant open door - by OPK - 04-13-2011, 02:39 PM



Users browsing this thread: 1 Guest(s)