And one last possible solution would be using the
proc_mode =
PROC_GLOBAL - the current entity function is not terminated when its my entity is removed by ent_remove, or when the level is changed. A7.76

like this, might work also:

Code:
action my_action()
{
 	my_function();
	while (...)
	{
		...
		wait(1);
	}
}

function my_function()
{
	proc_mode = PROC_GLOBAL; // lite-C

 	PANEL* pan = pan_create(...);
	while (me != NULL)
	{
		...
		wait(1);
	}
	pan_remove(pan);
}



That could possibly work also, hope that helps,
Loco


Professional A8.30
Spoils of War - East Coast Games