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
#6
RE: looping timer not working

Mudbill Wrote:Most likely the game doesn't use the value 0.0 for sanity, at least not for long enough for the timer to pick it up. Perhaps once it hits 0.0, the value is immediately bumped up to the recovery value as the sanity collapse happens.

When Daniel gets back up at the end of the sanity collapse is when it restores to the recovery value - the game keeps Sanity locked down at the "min" value but it doesn't update/lower when Daniel collapses.

RaXZerGamingZ Wrote:the lowest sanity goes by draining from darkness is 0.001250 i think, the strange part is i originally put in the code " <=0.0f "

By that logic, the if-conditional would have been correct if sanity reached a point where it was less than 0.0 with a bunch of zeros appended, since 0.0 implies just 0. This would also therefore work if no matter low sanity must be 0 exact for Daniel to collapse, then any sort of "negative" sanity (an instance where you receive sanity damage at an already low enough state) should reset the sanity to be exactly 0.

The issue is, if the engine is doing rounding to determine when Daniel is to collapse, it doesn't exactly correspond with the sanity value. If Daniel collapses but still is at 0.000125 sanity, the sanity is still technically greater than 0. Therefore, it didn't pass the if check but continued to loop correctly.

This is why I mentioned looking at the sanity values for when Daniel collapses. With a few tweaks to the game.cfg file, I bet you can find an "exact" value to test for to see when Daniel collapses, and then update your if to check if the sanity is less than or equal to that value. Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-17-2019, 04:39 AM by Romulator.)
03-17-2019, 04:38 AM
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)