#define i_am_alive skill55 //any unused skill number will do
void runWhileEntity(ENTITY** inLight)
{
while(inLight.i_am_alive == true)
{
*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);
theEnt.i_am_alive = true;
runWhileEntity(&theEnt);
while(key_t == OFF) wait(1);
theEnt.i_am_alive = false;
wait(1); //critical!
ent_remove(theEnt);
}