I was wondering how I can make a bar (kind of like a health bar) that is ticking down very slowly. And when you are in a special area then your bar should be refilled.
The goal for the game is to turn on lights so you're not in the dark. because when you're in the dark the scared bar should react.
Ill (hopefully) point you in the right direction until someone gives you a better answer.
Create a global variable called light and give it a value of 100(or anything).
then start an event -> every 1(or x) seconds
-> subtract 1 from light.
(That will make it gradually reduce the light variable).
Make an object. Add event -> on overlap with player
->add 10 to light.
(that will fill it up when the object is stepped on).
Then all you need is to apply darkness based on the number in the light variable.
Thanks! I will try it
I have a bar that should resize depending on the global value.. but it doesn't work
Im by no means an expert, but if you post a cap.x i will take a look.
Worse case scenario i cant help, the cap.x will still let the next person help you easier.
here ya go. I'm not sure what part(s) you needed help with, so please ask specific questions if you have any:
draining health capx
use the arrow keys to move the guy. blue area is the recharge area.
Develop games in your browser. Powerful, performant & highly capable.
omg.. that's what I need! You are amazing! thanks thanks thanks