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
Get Sanity to drain in the dark and increase in the light?
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#9
RE: Get Sanity to drain in the dark and increase in the light?

Well you could do a looping timer, which checks if (new_sanity >= old_sanity) 0.5 seconds ago.
If it isn't, it deducts x sanity from the player, and checks if (sanity >= (sanity - x)).
(If it is true it doesn't deduct sanity and recalls the timer)
This can loop every 0.5 seconds. x should be really small. The drawback is it will deduce extra sanity when you lose sanity other ways.

As mentioned earlier you can also make a full conversion, but if you weren't planning on making a full conversion in the first place, this is a pretty good alternative. (I've used it in my story Smile )

(This post was last modified: 04-12-2012, 09:11 PM by DRedshot.)
04-12-2012, 09:09 PM
Find


Messages In This Thread
RE: Get Sanity to drain in the dark and increase in the light? - by DRedshot - 04-12-2012, 09:09 PM



Users browsing this thread: 1 Guest(s)