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!
Karai16 Offline
Member

Posts: 164
Threads: 24
Joined: Apr 2011
Reputation: 0
#3
RE: Scripting noob, help needed!

(05-22-2011, 12:15 PM)Kyle Wrote: 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);
}
wow Kyle, you're everywhere today O.o ... I just wanted to put in the same thing Tongue saves me work though.

Custom stories:
Her Games (100% Complete)
Her Games, All Bugs Fixed (100% Complete)
05-22-2011, 02:16 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)