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
[SOLVED]Sanity script problem
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#1
[SOLVED]Sanity script problem

void OnStart()
{
AddTimer("", 1, "AmountOfSanity");
}

void AmountOfSanity(string &in asTimer)
{
if(GetPlayerSanity() < 100.0f)
{
PlaySoundAtEntity("Player", "insanity_whisper.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "insanity_baby_cry.snt", "Player", 0, false);
}
}


So , I need a normal script, if sanity is lower than x amount, in my case is 100 for test, player hears insane sounds. But in my script its not happening. Anybody can give me a working script example?

I putted many scare areas and get 0 sanity but nothing...

Thanks, + reputation for man that will help me Smile

Egypt CS
[Image: 27003.png]
(This post was last modified: 11-17-2014, 07:40 PM by Catalyst.)
10-18-2014, 06:44 PM
Find


Messages In This Thread
[SOLVED]Sanity script problem - by Catalyst - 10-18-2014, 06:44 PM
RE: Sanity script problem - by DnALANGE - 10-18-2014, 08:16 PM
RE: Sanity script problem - by Catalyst - 10-19-2014, 10:08 AM
RE: Sanity script problem - by DnALANGE - 10-19-2014, 11:51 AM
RE: Sanity script problem - by Catalyst - 10-19-2014, 11:52 AM



Users browsing this thread: 1 Guest(s)