Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Volkovstudio, Grant, Quad), 4,321 guests, and 25 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 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 Online
Senior Expert
Quad  Online
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