Gamestudio Links
Zorro Links
Newest Posts
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
ZorroGPT
by TipmyPip. 10/26/26 08:09
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 9,343 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 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