Alright.. So I have a level in which my character has an action that creates a hair model. The hair model gets an action that stores its creator in a local pointer so it can attach itself to the head. When I return to the menu during the level and reload the level, I get error E1515 for the hairs action. I put a draw_text in the while loop of the hair and sure enough it stays running when I return to the menu. My game main menu is its own level (as a background to the panels). So... Why the heck wouldn't this model be getting removed after the level load?
Code:
action hairmodel()
{
ENTITY* creator = you;
while(creator != NULL)
{
proc_mode = PROC_LATE; //wait until animations done, etc
vec_set(...)//set myself to 'creator' head bone and stuff
}
}
action character()
{
ENTITY* myhair;
myhair = ent_create("chickhair.mdl",vector(my.x,my.y,my.z-32),hairmodel);
...
set(myhair,VISIBLE); //
...
}