Need help please! At a loss for 'Sanity Level' script

Hey guys.

Me and a few friends are making a game and incorporating a (Javasript) ‘Sanity Level’ like in Amnesia, Hide and Seek, etc…
Problem is, NO IDEA how to do this or where to start. This one is brand new to me. I’m a pretty good scriptor/programmer, but this script is alluding me. :frowning:

So if someone could either redirect me to where to go for a starter or just help me out on here please. :slight_smile:

[I can’t find any references either]

Any help is appreciated.

you have to ask specific questions about the things you are trying to do all i know from reading this is that you are trying to use javascript.
what are you trying to get help with? movement? shooting if any? did you checked out the unity tutorials?

Hey sorry.

Ok so here is the break down.

Trying to make a script for a Sanity Level. Best reference I can think of is from the Amnesia games. Where you are either seeing things or getting extremely scared. Your sight is blurred and moving gets harder and harder as you stumble around. The best way to describe it is checking it out here.

Not shooting anything either. All just moving.

Well break down the pieces of it:

  • You need to keep track of the player’s current sanity level
  • You need to create a GUI display that shows what the current sanity level is
  • You need to create image effects that blur the screen, desaturate, etc, when the sanity level gets low

Each of those can be a separate script. Here, I wrote the first one for you:

// Player's sanity, between 0 and 100
var sanityLevel : float;

YES! Ah-ha! Nice thanks!
Was it really that simple? Damn my brain some times.