RATED ARCADE
Member
1. I set up a global variable (global.phealth) which I display as a health system for my player. I'm looking to have this global.variable remain persistent throughout each level so that his health carries over from room to room, but once the level transitions or restarts; instead of the bar staying at the last position it once was, it restarts. I've also checked off the persistent box for this object as well and still no luck. Does anyone have any suggestions?
- I control the increase or decrease in the levels of the bar by
global.phealth -= 10; or global.phealth += 10;
The Healthbar code is:
Create:
Draw:
- I control the increase or decrease in the levels of the bar by
global.phealth -= 10; or global.phealth += 10;
The Healthbar code is:
Create:
GML:
global.phealth = 0;
GML:
draw_sprite_ext(sprite_Coach_Health,0,x,y,global.phealth/100,1,0,c_white,1);
draw_self();