2 registered members (3s05bmmc, flink),
650
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
entity not being purged after level load - causing E1515
#445261
09/01/14 19:35
09/01/14 19:35
|
Joined: Mar 2003
Posts: 1,524 Canada
Stansmedia
OP
Serious User
|
OP
Serious User
Joined: Mar 2003
Posts: 1,524
Canada
|
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?
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); //
...
}
Last edited by Stansmedia; 09/01/14 21:20.
|
|
|
Re: entity not being purged after level load - causing E1515
[Re: Stansmedia]
#445262
09/01/14 19:40
09/01/14 19:40
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
set(hairmodel,VISIBLE); Is wrong. 'hairmodel' is your action, not an entity.
POTATO-MAN saves the day! - Random
|
|
|
Re: entity not being purged after level load - causing E1515
[Re: Stansmedia]
#445264
09/01/14 21:25
09/01/14 21:25
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
yeah, simple copy&paste mistakes, everyone makes these.
one tip though, choose your names more careful. 'hairmodel' sounds indeed like an entity... I'd use something like 'AC_hairmodel' as action.
POTATO-MAN saves the day! - Random
|
|
|
Re: entity not being purged after level load - causing E1515
[Re: Stansmedia]
#445266
09/01/14 22:31
09/01/14 22:31
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
1st. now that I notice it, there really should be a wait(1) at the and of that while (if you haven't put one there already). 2nd. I'd also add an ent_remove for the hair model after the loop has been terminated (except you're doing something special there and want to keep the hair model) 3rd. I'm not sure why your while look isn't working properly but #1 might solve that.
POTATO-MAN saves the day! - Random
|
|
|
|