So I tried to make an HP bar. If I try to update it I must use CLS but I don't want the whole screeen to get cleared.
Is there any way to fix this or clear only a part of the screen?
SCREEN _NEWIMAGE(800, 600, 32)
white& = _RGB(255, 255, 255)
green& = _RGB(0, 255, 0)
fhp = 100
hp = fhp
DO
REM Health Bar
'outter line
ol_x = 797 - fhp
LINE (ol_x, 0)-(799, 17), white&, B
'hp
hp_x = ol_x + 1
hp_x1 = hp_x + hp
LINE (hp_x, 1)-(hp_x1, 16), green&, BF
_DELAY 1
hp = hp - 10
CLS
LOOP UNTIL INKEY$ = CHR$(27) OR hp = 0
Place a black box over the green end area and work it back to the start.
You can replace the white frame each loop or place the green box inside of it instead.
burger2227 wrote:Place a black box over the green end area and work it back to the start.
You can replace the white frame each loop or place the green box inside of it instead.
sorry because it took me so long to answer but thank you so much!!!