- Joined
- Apr 22, 2022
- Messages
- 6
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- VNM
I want to make a virtual pet sort of aspect to my game, and while I have figured out how to interact with them, I can't get them to visibly regain health. Which is sort of the point of a game. Basically, I have set the health variable to 100 and after a 120 frame wait time I have it lose health and change the heart image to reflect that. I can get it to automatically lower the health to the point where it dies, and incremental images reflect that but doing things that improve health do not change the image despite it being a loop based on the health variable.
I have no plugins, and this is being run as a parallel common event. I do not define health in the common event for fear of it replacing the already set value and not counting down.
Basically, my question is, where in this code / how do I communicate a health increase so that the image changes? I have nothing regarding healing in this code as this is the dying part that works. I have tried a lot of things already (different loops, placements, switches, ect) but at this point would like to know how somebody better at this than me would go about it.
So, disregarding the actual 'call to heal' which is located in other events that do change the health variable how do I get this code to reflect the new health images?
From my point of view, the loop figures out what number range the health is and returns an image and since it is a loop it should recheck every time it runs, but that is not the case. Instead, it can never return a higher image value that what it went to so it can go from 100 -> 80's image but not 80's image to 100's. So there has to be something in here that is not allowing that right? I thought by turning off all the other options with switches I would be able to change the image, but that is not the case.
Basically, I just want the loop to be able to change the image in reverse, it can already change images 100 -> 0 but not 0 -> 100 and I would like to know why. It seems with the annoying off switches or not nothing changes, but that was my best guess.
Thank you, I'm hoping it is something obvious I missed. I'm sorry for rambling I'm bad at explaining things.

I have no plugins, and this is being run as a parallel common event. I do not define health in the common event for fear of it replacing the already set value and not counting down.
Basically, my question is, where in this code / how do I communicate a health increase so that the image changes? I have nothing regarding healing in this code as this is the dying part that works. I have tried a lot of things already (different loops, placements, switches, ect) but at this point would like to know how somebody better at this than me would go about it.
So, disregarding the actual 'call to heal' which is located in other events that do change the health variable how do I get this code to reflect the new health images?
From my point of view, the loop figures out what number range the health is and returns an image and since it is a loop it should recheck every time it runs, but that is not the case. Instead, it can never return a higher image value that what it went to so it can go from 100 -> 80's image but not 80's image to 100's. So there has to be something in here that is not allowing that right? I thought by turning off all the other options with switches I would be able to change the image, but that is not the case.
Basically, I just want the loop to be able to change the image in reverse, it can already change images 100 -> 0 but not 0 -> 100 and I would like to know why. It seems with the annoying off switches or not nothing changes, but that was my best guess.
Thank you, I'm hoping it is something obvious I missed. I'm sorry for rambling I'm bad at explaining things.
