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
#3
RE: Solution

(08-07-2012, 11:53 PM)Ongka Wrote: 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.
Ohwwwww dangit I didn't see that. Anyway, I get the following fatal Error : DoorMonsterSlam is not declared?

[Image: 25F7U37.png]
08-08-2012, 12:02 AM
Website 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)