Working on a new template simple game. My enemy model uses the healthbar code from aum so the healthbar stays with each enemy.
When the skill =0 the enemy gets removed but it seems tiny pieces of the healht bar keep floating around. Any ideas ?

Code:
#define health skill20
function health_indicator()
{
	ENTITY* ent_owner = you;
	
	set (my, BRIGHT | PASSABLE);
	my.lightrange =60;
	my.ambient = 60;

	while(1)
	{
		
		if (ent_owner)
		{
			vec_set (my.x, ent_owner.x);
			my.z += 15;
			
			my.scale_x = ent_owner.health * 0.2; // skill20 aka "health" stores the health for each entity
			wait (1);
		}
		
		
	}
}



Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain