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
Script Help Fatal Error on this script
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#5
RE: Fatal Error on this script

////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "BasementKey_1", "mansion_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "startkey", "cabinet_1", "UsedKeyOnCabinet", true);
}

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

void UsedKeyOnCabinet(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet_1", 0, false);
RemoveItem("startkey");
}

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

Changed the function name, this should work.

[Image: 18694.png]
(This post was last modified: 08-16-2012, 07:01 PM by Ongka.)
08-16-2012, 07:00 PM
Find


Messages In This Thread
Fatal Error on this script - by jtylerg - 08-15-2012, 04:07 PM
RE: Fatal Error on this script - by Adny - 08-15-2012, 04:19 PM
RE: Fatal Error on this script - by Ongka - 08-15-2012, 04:19 PM
RE: Fatal Error on this script - by jtylerg - 08-16-2012, 06:44 PM
RE: Fatal Error on this script - by Ongka - 08-16-2012, 07:00 PM
RE: Fatal Error on this script - by jtylerg - 08-16-2012, 08:44 PM
RE: Fatal Error on this script - by Adny - 08-16-2012, 07:16 PM



Users browsing this thread: 2 Guest(s)