I am working on a mechanism which I couldn’t find any reference to online as a tutorial so I thought someone here could help me with it.
I am trying to create a “Fear Bar” Which does the following:
Starts as 0, Max is 100, The number grows as you come closer to a scary item and goes back to 0 gradually as you get away from the object. This is easy and I’ve done it.
What I am stuck with is trying to also make it also grow through time, as in every second the fear bar will add 1 every seconds meaning after 100 seconds you will die. I have done that with a normal timer for the game and it worked for the timer but not the Fear Bar
Now, the most complicated thing I couldn’t also even figure out “and I hope I will be able to explain”, is that If your current fear is say “10” Already and you come close to something scary which will obviously raise your fear. I want the number to go back to “10” When you get away from that object instead of going all the way to 0.
I was thinking maybe the solution is to hook the fear factor to the timer maybe?
I hope I explained what I want clearly but in case I didn’t please don’t hesitate to ask.