thank you guys i will dive into this and see if i can solve it so i can wrap this little game up. I encounter this many times. AUM has scripts that work but clearly sometimes are not the best ways to do things or I am missing stuff to use it the right way laugh



Fixed it changed the script a bit and now when healht is <=0 it is removed completely without errors. a clip can be seen here :

https://youtu.be/--y93hLTipE

Code:
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);
		}
		if(ent_owner.health <=0){
			ent_remove(me);
			break;
		}
		
		
	}
}


Last edited by Realspawn; 11/18/17 08:49.

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

Creativity starts in the brain