Ive made a health bar for the main character but I cant seem to make on for the enemy.
Here is what I have so far(A and S to make health go higher or lower):
sync on
sync rate 30
backdrop on
color backdrop rgb(0,0,0)
health = 100
do
if keystate(30) = 1
dec health
if health < 1 then health = 0
endif
if keystate(31) = 1
inc health
if health > 100 then health = 100
endif
box 10,10,210,20,rgb(255,0,0),rgb(255,0,0),rgb(0,255,0),rgb(0,255,0)
box health*2+10,10,210,20,rgb(0,0,0,),rgb(0,0,0),rgb(0,0,0),rgb(0,0,0)
sync
loop
How do you make one on the right for whatever enemy you are facing?
I dont need anykeys to make the health bar go higher or lower.