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
.Lang File Help (FIXED) Can't use key on door.
Darkaroth Offline
Junior Member

Posts: 11
Threads: 2
Joined: Feb 2012
Reputation: 0
#1
(FIXED) Can't use key on door.

Hey all.

I'm trying to make a amnesia custom map (started yesterday) and for some reason my key won't work on the door.
What's wrong?

This is the script:
////////////////////////////
// Run when entering map
void OnStart()
{
AddEntityCollideCallback("Player", "scriptmusic","scriptmusic", true, 0);
AddEntityCollideCallback("Player", "CloseDoor1", "CollideCloseDoor1", true, 1);
AddUseItemCallback("", "key1", "Door_1", "UsedKeyOnDoor", true);
}

void scriptmusic(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlayMusic("19_event_brute.ogg", true, 1.00, 0, 5, true);
}
if (alState == -1)
{
StopMusic(10, 5);
}

}

void CollideCloseDoor1(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorLocked("mansion_2", true, true);
}

void UsedKeyOnDoor(string &in item, string &in door)
{
    SetSwingDoorLocked("Door_1", false, true);
    PlaySoundAtEntity("", "unlock_door", "Door_1", 0, false);
    RemoveItem("key1");
}


and this is the .lang file:
    
        key
        key

sorry for my english ( secondary language )
(This post was last modified: 02-06-2012, 09:06 PM by Darkaroth.)
02-06-2012, 07:11 PM
Find


Messages In This Thread
(FIXED) Can't use key on door. - by Darkaroth - 02-06-2012, 07:11 PM
RE: Can't use key on door. - by Elven - 02-06-2012, 07:49 PM
RE: Can't use key on door. - by Darkaroth - 02-06-2012, 07:51 PM
RE: Can't use key on door. - by Obliviator27 - 02-06-2012, 09:00 PM
RE: Can't use key on door. - by Darkaroth - 02-06-2012, 09:06 PM



Users browsing this thread: 1 Guest(s)