Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/06/26 07:18
zorro with ccxt?
by opm. 03/03/26 03:17
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
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 5,487 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
[SOLVED] particle is not removed ? #465917
05/17/17 13:58
05/17/17 13:58
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi,

I am not sure why but for some reason particles are not removed after time (/lifespan does not do anything), here is the code:

Code:
function spawnParticle (PARTICLE* p) {
	p.bmap = ui_cursor; //just testing
	p.size = 3;
   p.alpha = 100;
   p.lifespan = 2;
	vec_set(p.blue, vector(255, 255, 255));
   set(p, MOVE | TRANSLUCENT); //BRIGHT | 
}
...
effect(spawnParticle, 1, ent.x, vector(0,0,20));


Last edited by Reconnoiter; 05/18/17 09:49.
Re: particle is not removed ? [Re: Reconnoiter] #465922
05/17/17 17:03
05/17/17 17:03
Joined: Sep 2009
Posts: 1,034
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,034
Budapest
What if when you create only one particle?

Re: particle is not removed ? [Re: Aku_Aku] #465926
05/18/17 02:30
05/18/17 02:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Add
p.event = NULL;
to your spawnParticle() function. Otherwise, that same function or event would be executed for the same particle(s) each frame, continously resetting lifespan to 2.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: particle is not removed ? [Re: Superku] #465944
05/18/17 09:48
05/18/17 09:48
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: Superku
Add
p.event = NULL;
to your spawnParticle() function. Otherwise, that same function or event would be executed for the same particle(s) each frame, continously resetting lifespan to 2.
, tnx that was the indeed the problem.


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