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
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#5
RE: amnesia level editor key for locked door problem

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.

In Ruins [WIP]
02-20-2013, 08:47 AM
Find


Messages In This Thread
RE: amnesia level editor key for locked door problem - by NaxEla - 02-20-2013, 08:47 AM



Users browsing this thread: 2 Guest(s)