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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer Not Working
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#1
Timer Not Working

I have a scare set up where your locked in a room with a grunt for a short period of time. Once the timer finishes the grunt is supposed to disappear in a flash of light and the door to the room unlocks. The only problem is that the timer is not responding and I have no idea why. Heres the code in question:

void RoomScare(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
AddPropImpulse("mansion_7", 0, 0, -50, "world");
SetSwingDoorLocked("mansion_7", true, true);
GiveSanityDamage(1, true);
SetPlayerActive(true);
AddTimer("roomscarefinish", 5.0f, "RoomScareFinish");
SetEntityActive("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_30", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_31", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_32", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_33", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_34", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_35", 1.0f, "idle");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_36", 1.0f, "idle");
}

void RoomScareFinish()
{
GiveSanityBoostSmall();
StartEffectFlash(0.3f, 1.0f, 1.0f);
SetSwingDoorLocked("mansion_7", false, true);
SetEntityActive("servant_grunt_3", false);
}
06-17-2013, 12:12 AM
Find


Messages In This Thread
Timer Not Working - by zergling50 - 06-17-2013, 12:12 AM
RE: Timer Not Working - by PutraenusAlivius - 06-17-2013, 12:45 AM



Users browsing this thread: 1 Guest(s)