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
amnesia level editor key for locked door problem
carlos111897 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Feb 2013
Reputation: 0
#6
RE: amnesia level editor key for locked door problem

(02-20-2013, 08:47 AM)NaxEla Wrote: Oh geez, how could I have missed this...

PHP Code: (Select All)
////////////////////////////
// Run when entering map
void OnEnter()
{
void AddUseItemCallback("","monsterdoorkey_1""bedroommansiondoor ""UsedKeyOnDoor"true);
// a couple problems in the line above
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("bedroommansiondoor"falsetrue);
PlaySoundAtEntity("""unlock_door""bedroommansiondoor"0false);
RemoveItem(monsterdoorkey_1); // problem here too


In the line:
void AddUseItemCallback("","monsterdoorkey_1", "bedroommansiondoor ", "UsedKeyOnDoor", true);
Take out the void at the beginning of the line. Also, you had a space after bedroommansiondoor.

Also, you should change RemoveItem(monsterdoorkey_1) to RemoveItem("monsterdoorkey_1"). You needed to add quotations ("") around monsterdoorkey_1.

Thank for your help but it still doesnt work Sad keeps on saying "unable to use item"
02-20-2013, 06:55 PM
Find


Messages In This Thread
RE: amnesia level editor key for locked door problem - by carlos111897 - 02-20-2013, 06:55 PM



Users browsing this thread: 2 Guest(s)