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}
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#2
Solution

void OnStart()
{
AddEntityCollideCallback("Player", "StairArea", "Sound", true, 1);
SetEntityPlayerLookAtCallback("MonsterArm", "ArmScare", true);
}

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);
AddTimer(MonsterDoorSlam, 7, MonsterDoorSlam1);
}

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

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

void OnLeave()
{

}

Your script plays 7 seconds after the map starts, with this script it happens 7 seconds after the ArmScare.

[Image: 18694.png]
08-07-2012, 11:53 PM
Find


Messages In This Thread
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)