Frictional Games Forum (read-only)

Full Version: Quick Sanity Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Whats the code to restore sanity to normal?
http://wiki.frictionalgames.com/hpl2/amn..._functions

Go down to the "Player" section and you will see it.
I tired to find it, but not exactly sure what one to use.
SetPlayerSanity(100).
Thank you kindly! Big Grin
I want to bump it up for another question.

If you have set your sanity to 70, will it restore back to 100 or the maximum amount is 70 overall?
(08-27-2011, 02:34 PM)Elven Wrote: [ -> ]If you have set your sanity to 70, will it restore back to 100 or the maximum amount is 70 overall?

Think of SetPlayerSanity() as a convenience function, where you don't have to get the current sanity value and add up (or subtract) to the value you want it at. Sanity will still increase up to 100 so long as the player is in the light.
Ok. Thank you. I also went ingame and noticed that sanity also regains pretty slowly Wink.