Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (MadJack, AndrewAMD, Quad), 540 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
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