So I’m using the health behaviour on my character using global variables, as you can open a new scene to buy Health and such.
I have tried to take the two main variables we will call them
(Global)Health
(Global)MaxHealth
So on my store scene I set these two variables to a certain number to increase the health.
A few things ive tried is
Setting the health points on “At the beginning of the scene”
This just causes the points to revert back when I exit the Store. But I can see my health counter flash the new number for a split second when I get back.
Second I Used “On Scene resume” Now this kind of worked, Except I would have to go into the store twice because it would only increase one variable at a time, until I left then went back the second time, so not ideal.
BUT!. I have figured out a somewhat ideal solution.
Is Using timers, Everything works hunkydory woohoo!!
and I understand That most people who would play this game can run it run it 500x at the same time without a single frame drop. But Im worrying about the little guy who has a potato. so.
Is there a way I can do this differently so it’s not tied to the frame rate, or am I just thinking of non existent problems?
Because unfortunately this is the only way I can get the variable from the store to update when returning to the main scene.
