Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (opm), 778 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Serious User
Stansmedia  Offline 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?

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); //
...
}


Last edited by Stansmedia; 09/01/14 21:20.

Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
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 Offline
Expert
Kartoffel  Offline
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: Kartoffel] #445263
09/01/14 21:20
09/01/14 21:20
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
My bad. I quickly whipped up that code as an example instead of copying and pasting the actions, they are quite long.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
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 Offline
Expert
Kartoffel  Offline
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: Kartoffel] #445265
09/01/14 21:29
09/01/14 21:29
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
no idea why the action hairmodels()'s while loop isn't terminating on level switch? I have a draw_text(...) in the loop to show when its running, and when i switch levels its still going. I don't know what's stopping it from terminating.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
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 Offline
Expert
Kartoffel  Offline
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
Re: entity not being purged after level load - causing E1515 [Re: Kartoffel] #445268
09/01/14 23:31
09/01/14 23:31
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
proc_mode = PROC_LATE is screwing something over. I removed it and it seems to work. I don't understand why it's being so fussy. This is ridiculous. I use the same script in all the other levels, but for some reason this one wants to be... BAH.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1