Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 991
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 991
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 | chip programmers | 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