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
Scripts not working
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: Scripts not working

Use this:


Quote:void OnStart()

{
AddUseItemCallback("", "SUPER HAX KEY THAT SUCKS", "das door", "hax", true);
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);

for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
}
}

void hax(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
PlaySoundAtEntity("", "unlock_door", "door" , 0, false);
RemoveItem("SUPER HAX KEY THAT SUCKS");

}




void OnEnter()
{

}


void OnLeave()
{

}
Whenever you are naming something in a field that has the word "string" in it means that you need to put the exact name of the thing you are describing as well as "" around the start and end of the text. I fixed it up for you.

01-13-2012, 01:29 AM
Find


Messages In This Thread
Scripts not working - by Bozcovich - 01-12-2012, 09:54 PM
RE: Scripts not working - by Statyk - 01-13-2012, 12:23 AM
RE: Scripts not working - by flamez3 - 01-13-2012, 01:29 AM
RE: Scripts not working - by Bozcovich - 01-13-2012, 09:22 PM
RE: Scripts not working - by Unearthlybrutal - 01-13-2012, 10:34 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 10:53 PM
RE: Scripts not working - by Unearthlybrutal - 01-13-2012, 10:58 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 11:03 PM
RE: Scripts not working - by oscar1007 - 01-13-2012, 11:13 PM
RE: Scripts not working - by Bozcovich - 01-13-2012, 11:26 PM
RE: Scripts not working - by Unearthlybrutal - 01-14-2012, 12:13 PM



Users browsing this thread: 1 Guest(s)