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
I need help with my coding.
tristanisms Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jul 2012
Reputation: 0
#1
I need help with my coding.

I'm very new at Amnesia custom stories, and VERY new at coding. All I'm trying to do is make a key unlock a door (for now, maybe more help will be needed in the future). This is my work. The error I keep getting is that it won't let me unlock the door, it just says "Item cannot be used that way" please proofread and help me out.


////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Bedroom Key", "Bedroom Door", "UsedKeyOnDoor", true);
}

void UsedDoorKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroom Door", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom Door", 0, false);
RemoveItem("Bedroom Key");
}

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

}
08-02-2012, 07:38 PM
Find


Messages In This Thread
I need help with my coding. - by tristanisms - 08-02-2012, 07:38 PM
RE: I need help with my coding. - by Adny - 08-02-2012, 07:43 PM
RE: I need help with my coding. - by tristanisms - 08-02-2012, 07:46 PM



Users browsing this thread: 1 Guest(s)