Then how about this...
Code:
#define I_AM_ALIVE	(1<<30)   //unused entity flag bit

void runWhileEntity(ENTITY* inLight)
{
	while(is(inLight, I_AM_ALIVE))
	{
		inLight.x += time_step;
		my_temp[0] = inLight.x;
		wait(1);
	}
	beep();
	beep();
	beep();
}

void main()
{
	set(deb_pan,SHOW);
	level_load(NULL);
	wait(3);
	
	ENTITY* theEnt;
	theEnt = ent_create(NULL,nullvector,NULL);
	set(theEnt, I_AM_ALIVE);

	runWhileEntity(theEnt);
	while(key_t == OFF) wait(1);
	reset(inLight, I_AM_ALIVE);
	wait(1);   //still critical!
	ent_remove(theEnt);
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial