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
looping timer not working
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: looping timer not working

What are you trying to accomplish with your timer?

Your timer is working, but your if-statement isn't, assuming you are trying to give damage when sanity is at its minimum. Test your if statement by checking if your sanity is less than 0.1f instead and see if that works.

PHP Code: (Select All)
void Timer(string &in asTimer)
{
     if(
GetPlayerSanity() < 0.1f)
     {
          
//code
     
}


You may opt for "finer" values if you want to be more specific about when to carry out the if-block (0.05f, 0.007f, etc).

Make sure, if you have not yet, to Set up the Developer Environment in Amnesia so that you can see your exact sanity values when you tick some of the options in the Debug Menu (Pressing F1 in game).

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-16-2019, 12:39 PM by Romulator.)
03-16-2019, 12:38 PM
Find


Messages In This Thread
looping timer not working - by RaXZerGamingZ - 03-16-2019, 12:10 AM
RE: looping timer not working - by Romulator - 03-16-2019, 12:38 PM
RE: looping timer not working - by RaXZerGamingZ - 03-16-2019, 05:56 PM
RE: looping timer not working - by Mudbill - 03-16-2019, 11:38 PM
RE: looping timer not working - by RaXZerGamingZ - 03-17-2019, 12:09 AM
RE: looping timer not working - by Romulator - 03-17-2019, 04:38 AM
RE: looping timer not working - by RaXZerGamingZ - 03-17-2019, 12:44 PM



Users browsing this thread: 1 Guest(s)