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
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 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
removing an entity after a few seconds ? #313328
02/28/10 19:00
02/28/10 19:00
Joined: Apr 2008
Posts: 437
dracula Offline OP
Senior Member
dracula  Offline OP
Senior Member

Joined: Apr 2008
Posts: 437
Can someone please remind me how to remove an entity after a few seconds. I am producing some physics objects and I want to remove them after a while as the engine slows down.

Thanks

Re: removing an entity after a few seconds ? [Re: dracula] #313331
02/28/10 19:13
02/28/10 19:13
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
function remove_ent(ENTITY* ent,var seconds){
wait(seconds*-1);
ent_remove(ent);
}

make sure you are using something like this in the removed entity

Code:
action physics_object{
  //your stuff here
  while(me){
      //more of your stuff
      if(some_certeain_thing_happens)remove_ent(me,0.5);
      wait(1);
  }
}




3333333333
Re: removing an entity after a few seconds ? [Re: Quad] #313334
02/28/10 19:38
02/28/10 19:38
Joined: Apr 2008
Posts: 437
dracula Offline OP
Senior Member
dracula  Offline OP
Senior Member

Joined: Apr 2008
Posts: 437
Thank you, I'll try it

Cheers


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