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 Timer Error
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Timer Error

Do like this instead,

AddEntityCollideCallback("Player", "HoleCeilingEvent", "CollideHoleCeilingEventFunc", true, 1);




void CollideHoleCeilingEventFunc(string &in asParent, string &in asChild, int alState)
{
AddTimer("starteventhole", 0, "CeilingHoleEvent");
AddTimer("voice1", 1, "CeilingHoleEvent");
AddTimer("rock1", 1.5f, "CeilingHoleEvent");
AddTimer("rock2", 2.0f, "CeilingHoleEvent");
AddTimer("voice2", 3.0f, "CeilingHoleEvent");
}

void CeilingHoleEvent(string &in Timer)
{
if (asTimer == "starteventhole")
{
StartScreenShake(0.008f, 2.5f, 2.0f,6.0f);
}

else if (asTimer == "voice1")
{
PlayGuiSound("react_scare4.ogg", 1);
}

else if (asTimer == "rock1")
{
SetEntityActive("RockCeiling1", true);
}

else if (asTimer == "rock2")
{
SetEntityActive("RockCeiling2", true);
}

else if (asTimer == "voice2")
{
PlayGuiSound("react_scare2.ogg", 1);
}
}



(This post was last modified: 03-31-2012, 12:58 PM by SilentStriker.)
03-31-2012, 12:56 PM
Find


Messages In This Thread
Timer Error - by GoranGaming - 03-31-2012, 12:16 PM
RE: Timer Error - by SilentStriker - 03-31-2012, 12:56 PM
RE: Timer Error - by Your Computer - 03-31-2012, 01:25 PM
RE: Timer Error - by SilentStriker - 03-31-2012, 01:26 PM



Users browsing this thread: 1 Guest(s)