Today I came across a possible bug. I don’t know if this is supposed to happen or not, but I believe it should work.
I have a status structure for my character, which I am now creating the “Magic Points” or “MP” function.
My lines of code currently work 100%.
But if I change the current number that is there, in this case 10, and change it to the global variable that is in the structure, it doesn’t work!
I made a video to show what I’m doing.
Note in the video, that the blue bar of the “MP” decreases as soon as I start running, it’s correct. But if I put the global variable, that doesn’t happen… Why?
However, I created another global variable, called “lose” without being inside the structure, and it works!
I want to use the structure, because there will be player status progression, and it’s easier to save the game.
EDIT: Apparently, to work, I had to save the structure and then load it. (write and load)
But I believe this shouldn’t happen, since it’s a global variable!