[bb] Energy / Health / Hitpoint Bar by Nebula [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:40

Previous topic - Next topic

BlitzBot

Title : Energy / Health / Hitpoint Bar
Author : Nebula
Posted : 1+ years ago

Description : A function that will display information based on the input numbers.

Loading ..
Hitpoints ..
Health ...
Energy ..
Magic ...
Stanima ...
ect...


Code :
Code (blitzbasic) Select
Graphics 640,480,16,2
SetBuffer BackBuffer()
;
hp = 100
While KeyDown(1) = False
Cls
energybar(100,100,123,10,hp,100)
If hp>0 Then hp = hp - 1 Else Text 0,0,"Exit (esc)"
Flip
Wend
;
Function Energybar(x,y,width,height,hitpoints,hitpoints_total)
width = hitpoints / Float(hitpoints_total) * width
Rect x,y,width,height
End Function
;


Comments :


thelizardking(Posted 1+ years ago)

 nice