Ok, here is some of the original code...

The Action:
Code:
action EoR_aktion(){
	c_trace(vector(my.x+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[0],my.y+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[1],my.z+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[2]), vector(my.x+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[0],my.y+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[1],my.z-100), IGNORE_PUSH|IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES|IGNORE_CONTENT|USE_POLYGON);
	PARTICLE* bodentextur = ent_decal (spielfeld, baustellen_boden_tga, my.einheiten_reichweite*2, 0);
	my.einheiten_status = im_bau;
	[...]
	bodentextur_fuer_turm_steuern(bodentextur, me); //this line calls the function
	[...]
	EoR_mainFunktion(auge, balken1, balken2, balken3, balken4, balken5, balken6);
}
And the function:
Code:
function bodentextur_fuer_turm_steuern(PARTICLE* bodentextur, ENTITY* turm){
	set(bodentextur, TRANSLUCENT);
	bodentextur.alpha = 100;
	while (turm){
		bodentextur.lifespan = 16000;
		wait(1);
	}
	// The code below this line will never be executed. The function is terminated if the entity is removed
	debug1 = 1;
	while(bodentextur.alpha > 0){
		bodentextur.lifespan = 16000;
		bodentextur.alpha -= time_step;
		wait(1);
	}
	bodentextur.lifespan = 0;
}

So may someone please tell me why?!


GameStudio Version: A7 Pro v7.86