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
help with script
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: help with script

You had some misplaced brackets, this should be good:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "hammer", "block", "breakwood", true);
AddEntityCollideCallback("Player", "bookarea", "bookscare", true, 1);

}

void breakwood(string &in asItem, string &in asEntity)
{
SetEntityActive("block",false);
PlaySoundAtEntity("", "break_wood", "mansion_1", 0, false);
GiveSanityBoost();
RemoveItem(asItem);
}

void bookscare(string &in asParent, string &in asChild, int alState)
{
AddPropForce("book1", 31, 1, -19.25, "world");
SetEntityActive("light1",true);
SetEntityActive("light2",true);
SetEntityActive("mb_window_1",false);
SetEntityActive("mb_window_noglass_1",true);
SetEntityActive("rain",false);
PlaySoundAtEntity("", "break_glass_large", "mb_window_noglass_1", 0, false);
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

I rate it 3 memes.
07-06-2012, 09:37 PM
Find


Messages In This Thread
help with script - by mccrazy5 - 07-06-2012, 09:21 PM
RE: help with script - by Cruzore - 07-06-2012, 09:25 PM
RE: help with script - by mccrazy5 - 07-06-2012, 09:32 PM
RE: help with script - by Cruzore - 07-06-2012, 09:33 PM
RE: help with script - by mccrazy5 - 07-06-2012, 09:35 PM
RE: help with script - by Adny - 07-06-2012, 09:37 PM
RE: help with script - by Cruzore - 07-06-2012, 09:37 PM
RE: help with script - by mccrazy5 - 07-06-2012, 09:40 PM



Users browsing this thread: 1 Guest(s)