1 decade ago by Nico
Hey guys so I'm using the health bar entity snippet from pointofimpact.
It works fine for my player entity but I can't seem to make it work for any of the enemy entities.
Shouldn't it just work if I have health and MaxHealth set and this snippet in the init code?
It might help me if I knew what !ig.global.wm actually does :/
EDIT: Got it. I had changed something in the original health bar code to hard code the position to my players gui :P
It works fine for my player entity but I can't seem to make it work for any of the enemy entities.
Shouldn't it just work if I have health and MaxHealth set and this snippet in the init code?
if( !ig.global.wm ) { ig.game.spawnEntity(EntityHealthBar, this.pos.x, this.pos.y,{ Unit: this }); }
It might help me if I knew what !ig.global.wm actually does :/
EDIT: Got it. I had changed something in the original health bar code to hard code the position to my players gui :P