The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help I'm having trouble with the timer.. {Solved}
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#1
Exclamation  I'm having trouble with the timer.. {Solved}

I want to make a '''Bang on Door Effect'' 7 seconds after the event: void ArmScare(

I've tried some stuff but it didn't worked out as planned... can anyone fix this?



////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "StairArea", "Sound", true, 1);
SetEntityPlayerLookAtCallback("MonsterArm", "ArmScare", true);
AddTimer(MonsterDoorSlam, 7, MonsterDoorSlam1);
}

void MonsterDoorSlam1(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Door01", 0, 0, 5, "World");
PlaySoundAtEntity("", "21_bang_door.snt", "Door01", 0, false);
StartPlayerLookAt("BangDoor", 2, 2, "");
AddTimer("", 6, "AfterOwShit");
}

void ArmScare(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "Ow_Shit", "Player", 0, false);
GiveSanityDamage(8.0f, true);
}


void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "whatthehell", "StairArea", 0.0, false);
}

void OnEnter()
{
PreloadSound("whatthehell");
}

void OnLeave()
{

}

[Image: 25F7U37.png]
(This post was last modified: 08-08-2012, 02:05 AM by Melvin.)
08-07-2012, 11:14 PM
Website Find


Messages In This Thread
I'm having trouble with the timer.. {Solved} - by Melvin - 08-07-2012, 11:14 PM
Solution - by Ongka - 08-07-2012, 11:53 PM
RE: Solution - by Melvin - 08-08-2012, 12:02 AM
RE: Solution - by MyRedNeptune - 08-08-2012, 12:29 AM



Users browsing this thread: 1 Guest(s)