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 multiple keys
andrejapotic98 Offline
Junior Member

Posts: 4
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
Exclamation  I need help with multiple keys

I realy need help so please respond Smile .

I am making my custom story for a while and i already made the key for one locked door.
Now i decided to make another key for the another door.
So what i did, I copied the whole script again and just renamed key and locked door.
When i start the custom story the game crashes and shows:ERR: A function with the same name and parameters already exists.
I dont know whats the problem this is how it looks like:

void OnEnter ()
{
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true) ;
AddUseItemCallback("", "hallwaykey", "HallWayDoor", "UsedKeyOnDoor_1", true) ;
}

void UsedKeyOnDoor (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true) ;
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false) ;
RemoveItem ("monsterdoorkey_1") ;
}


void UsedKeyOnDoor (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("HallWayDoor", false, true) ;
PlaySoundAtEntity("", "unlock_door", "HallWayDoor", 0, false) ;
RemoveItem ("hallwaykey") ;
}

I saw that you have forum and i was like oh great someone will answer me. So please if you know the solution answer Big Grin .
08-11-2012, 11:29 AM
Find


Messages In This Thread
I need help with multiple keys - by andrejapotic98 - 08-11-2012, 11:29 AM
RE: I need help with multiple keys - by Steve - 08-11-2012, 12:06 PM
RE: I need help with multiple keys - by Adny - 08-11-2012, 01:45 PM



Users browsing this thread: 1 Guest(s)