Frictional Games Forum (read-only)

Full Version: Sanity Check
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys

It's been along time since I last worked with amnesia maps and scripting, but I am slowly starting again.

I gotten to a point where i want the game to check the players sanity and if it's below or egual to a certain value, things should happen. I tryed to play around with GetPlayerSanity, but i cant make it work.

Every help would be appreciated.
Code:
if(GetPlayerSanity())

If I'm not mistaken.
I have try'ed this without success:

if(GetPlayerSanity<=40)

if((GetPlayerSanity) <= (40))

if(GetPlayerSanity(40))
You're forgetting your parentheses. =p

Try this:

PHP Code:
if(GetPlayerSanity() <= Number
Thanks for help guys.

Works fine now