BTW, you say you are already using one skill in the plugin...
What sort of data does it contain?
Could you pass a "kill" command through that skill?
eg
#define plugin_skill "whichever skill the plugin is already using"
void runWhileEntity(ENTITY* inLight)
{
while(inLight.plugin_skill != -999)
{
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);
runWhileEntity(theEnt);
while(key_t == OFF) wait(1);
theEnt.plugin_skill = -999;
wait(1); //critical wait
ent_remove(theEnt);
}