@name HP Bar
@inputs
@outputs
@persist H G R
@trigger

interval(1)

H = owner():health()/100

G = owner():health()*2,55

R = 255-owner():health()*2,55

holoCreate(1)
holoPos(1,owner():pos()+vec(0,0,100))
holoScale(1,vec(1,1,H))
holoColor(1,vec(R,G,0))
holoAng(1,ang(0,0,0))
