Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting noob, help needed!
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Scripting noob, help needed!

Well, you could say I can literally almost script anything with the HPL 2 engine.

I see what you are trying to do, since the bone_saw_2 is a item, you need to go into your inventory and use it on the boards.

I could make it so complex to where it shows the animation of the saw cutting the boards, but I'm short on time. :/

Try this:

void OnStart()
{
     AddUseItemCallback("", "bone_saw_2", "wooden_boards_block_1", "SawGruntAlert", true);
}
void SawGruntAlert(string &in asItem, string &in asEntity)
{
     SetEntityActive("wooden_boards_block_1", false);
     SetEntityActive("wooden_boards_block_broken_1", true);
     PlaySoundAtEntity("", "23_saw2.snt", "Player", 0, false);
     AddTimer("", 1, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
     SetEntityActive("servant_grunt_1", true);
}

05-22-2011, 12:15 PM
Find


Messages In This Thread
Scripting noob, help needed! - by willochill - 05-22-2011, 04:45 AM
RE: Scripting noob, help needed! - by Kyle - 05-22-2011, 12:15 PM
RE: Scripting noob, help needed! - by Karai16 - 05-22-2011, 02:16 PM
RE: Scripting noob, help needed! - by Kyle - 05-22-2011, 02:26 PM
RE: Scripting noob, help needed! - by willochill - 05-26-2011, 04:19 AM



Users browsing this thread: 1 Guest(s)