No idea if I spelled that right.
So the first → p1 health is the health cap.
The Always → p1 health is the current health.
The first expression turns that into a percentage.
The second one cuts it in half. why is it… infinity?
No idea if I spelled that right.
So the first → p1 health is the health cap.
The Always → p1 health is the current health.
The first expression turns that into a percentage.
The second one cuts it in half. why is it… infinity?
Game link here
it shouldn’t even do that
Exactly.
Flowlab ahh math
So what is happening is that the top Global is not being set in time before the Expression is evaluated, so the value of B is still 0 at the point when it’s evaluated (and any number divided by 0 evaluates to be Infinity).
This is complicated, but the simplest way to fix it is just to connect that top Global to the eval input as well.
Also, it is usually not a good idea to name 2 of your Globals the exact same thing (try adding “Max” or “Current” after them, for instance).
you can use two timers instead of an always. 1 with a delay that starts another with 0 delay and runs forever
Yeah sorry I forgot to update this
I fixed it yesterday