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
delay in scares
lllDash Offline
Member

Posts: 108
Threads: 12
Joined: Apr 2012
Reputation: 3
#1
Question  delay in scares

I was wondering if anybody knows how to add a tiny scare delay after an event (like a monster spawning).
It would be nice if the player freaks out only shortly after a sound made by the monster.
here is what I have so far:


----------------------------------------------------------------------------------
void OnStart()

{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction_1", true, 1);

}
void MonsterFunction_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(5.0f, true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.001, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.001, "");
}
----------------------------------------------------------------
How would you modify this? If you can give me an example that would be great! thanks. ^_^
04-20-2012, 07:04 PM
Find


Messages In This Thread
delay in scares - by lllDash - 04-20-2012, 07:04 PM
RE: delay in scares - by Datguy5 - 04-20-2012, 07:14 PM
RE: delay in scares - by DRedshot - 04-20-2012, 07:16 PM
RE: delay in scares - by lllDash - 04-20-2012, 08:00 PM
RE: delay in scares - by lllDash - 04-24-2012, 03:45 PM
RE: delay in scares - by Prelauncher - 04-24-2012, 07:06 PM
RE: delay in scares - by lllDash - 04-25-2012, 06:56 PM
RE: delay in scares - by lllDash - 04-29-2012, 03:01 PM



Users browsing this thread: 1 Guest(s)