Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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