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
Script Help Scripting simple button
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#9
RE: Scripting simple button

(03-04-2012, 04:57 PM)Froggit Wrote:
(03-04-2012, 03:53 PM)Strembitsky Wrote: Fair point, but if it's something as basic as that, it means they have no idea how to script. I thought I would send them in the right direction Smile
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_4" , "HallwayScare" , true , 1);
}

void HallwayScare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "27_jam.snt", "Player", 0.5f, false);
SetEntityActive("corpse_male_1", true);
AddPropImpulse("corpse_male_1", 0, 0, 250, "world");
AddTimer("look03", 2.0f, "Timer_1");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0.5f, false);
}
void Timer_1(string &in asParent, string &in asChild, int alState)
{

}
How do I know when to put the extra timer at the end when there is no callback
The AddTimer("look03", 2.0f, "Timer_1"); does that.

Also you have the wrong syntax. Change
(string &in asParent, string &in asChild, int alState) to

(string &in asTimer)




(This post was last modified: 03-05-2012, 04:19 AM by flamez3.)
03-05-2012, 04:18 AM
Find


Messages In This Thread
Scripting simple button - by Froggit - 03-04-2012, 06:36 AM
RE: Scripting simple button - by Strembitsky - 03-04-2012, 06:57 AM
RE: Scripting simple button - by Froggit - 03-04-2012, 07:06 AM
RE: Scripting simple button - by flamez3 - 03-04-2012, 07:17 AM
RE: Scripting simple button - by Strembitsky - 03-04-2012, 07:17 AM
RE: Scripting simple button - by flamez3 - 03-04-2012, 09:12 AM
RE: Scripting simple button - by Strembitsky - 03-04-2012, 03:53 PM
RE: Scripting simple button - by Froggit - 03-04-2012, 04:57 PM
RE: Scripting simple button - by flamez3 - 03-05-2012, 04:18 AM
RE: Scripting simple button - by Froggit - 03-05-2012, 04:44 AM
RE: Scripting simple button - by flamez3 - 03-05-2012, 05:01 AM



Users browsing this thread: 1 Guest(s)