Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/27/26 22:06
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,688 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to ent_remove(ALL AVAILABLE ENTITIES); #215489
07/11/08 15:00
07/11/08 15:00
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
Is it possible rather than manually ent_remove() everything? And then simple ALL_ENTITIES = NULL; Any function for this?

Because I want to make a restart button but the game will crash (due to my bad programming) if I didn't remove all active entities properly .

Re: How to ent_remove(ALL AVAILABLE ENTITIES); [Re: Coisox] #215492
07/11/08 15:23
07/11/08 15:23
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Code:
ENTITY* ent_temp;

function remove_all_ents()
{
	ent_temp = NULL;
	you = ent_next(NULL);
	while (you != NULL)
	{ 
		ent_temp = you;
		you = ent_next(you);	
		ent_remove(ent_temp);
	}
}


Re: How to ent_remove(ALL AVAILABLE ENTITIES); [Re: oliver2s] #215494
07/11/08 15:31
07/11/08 15:31
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
What? This method really exist!? I'm soooo lucky to ask for this question. I thought I'm going to be flamed for asking such stupid question. :p

Thank you so much. This is really helpfull.

Re: How to ent_remove(ALL AVAILABLE ENTITIES); [Re: Coisox] #215495
07/11/08 15:48
07/11/08 15:48
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
Oh one more thing. Is it possible to do similar thing to variables? I mean, reset all variable just like when the first time loading.

And how about currently running function? Can we cancel and reset everything automatically?


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

Gamestudio download | 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