Frictional Games Forum (read-only)
Quick Sanity Question - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Quick Sanity Question (/thread-9858.html)



Quick Sanity Question - JetlinerX - 08-19-2011

Whats the code to restore sanity to normal?


RE: Quick Sanity Question - Rapture - 08-19-2011

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Go down to the "Player" section and you will see it.


RE: Quick Sanity Question - JetlinerX - 08-19-2011

I tired to find it, but not exactly sure what one to use.


RE: Quick Sanity Question - Your Computer - 08-19-2011

SetPlayerSanity(100).


RE: Quick Sanity Question - JetlinerX - 08-19-2011

Thank you kindly! Big Grin


RE: Quick Sanity Question - Elven - 08-27-2011

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?


RE: Quick Sanity Question - Your Computer - 08-27-2011

(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.



RE: Quick Sanity Question - Elven - 08-27-2011

Ok. Thank you. I also went ingame and noticed that sanity also regains pretty slowly Wink.