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
{SOLVED} Script Error: Item not Declared
Silent Darkness Offline
Junior Member

Posts: 37
Threads: 9
Joined: Jul 2012
Reputation: 0
#3
RE: Script Error: Item not Declared

(07-20-2012, 12:54 AM)JenniferOrange Wrote: void OnStart()
{
}
void OnEnter()
{
AddUseItemCallback("", "Closet_Key", "Closet_door","UsedKeyOnDoor",true);
}

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


////////////////////////////
// Run when leaving map

void OnLeave()
{

}
The .lang is fine, though you've forgotten void OnStart() and putting quotes around the key name. Should work now!
.... Exclamation Exclamation Exclamation I AM AN IDIOT.

Works now.
07-20-2012, 03:12 PM
Find


Messages In This Thread
RE: Script Error: Item not Declared - by Silent Darkness - 07-20-2012, 03:12 PM



Users browsing this thread: 1 Guest(s)