Anonymous Login
2021-10-24 20:00 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001198OpenClonkEngine - C4Scriptpublic2017-06-20 13:19
Assigned ToZapper 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Product Version 
Target VersionFixed in Version 
Summary0001198: Radial distribution for CreateParticles()
DescriptionThere is no way to create particles, which spread out radially, with CreateParticles()-parameters or PV_*s only. With the old particle-system you could easily do CastParticles().

Zapper mentioned one way to fix this would be set a fixed seed in PV_Random(). That way you could use the same returned array of PV_Random() for both parameters:

var rnd = PV_Random(0, 360);

CreateParticles([...], PV_Sin(rnd, p_speed), PV_Sin(rnd, p_speed, 90[?]),[...]);
Additional InformationA workaround until there is a consistent way:

for(var i = 0; i < p_amount; i++)
 var angle = Random(360);
 CreateParticles([...], Sin(angle, p_speed), -Cos(angle, p_speed), [...]);
TagsNo tags attached.
Attached Files




Zapper (developer)

Last edited: 2014-12-30 22:12

View 2 revisions

>Zapper mentioned one way to fix this would be set a fixed seed in PV_Random(). That way you could use the same returned array of PV_Random() for both parameters:

I was talking about some sort of seed-parameter for PV_Random (which then is particle-dependant). Then you could use the same random number for two values in a particle.

CreateParticles(..., PV_Cos(PV_Random(..,SEED1), PV_Random(..,SEED2)), PV_Sin(PV_Random(..,SEED1), PV_Random(..,SEED2)), ...)
.. which would make both Cos and Sin have the same radius and angle because of the same particle-local seed


Apfelclonk (reporter)

Ah. then I missunderstood you. But that sounds to be an even nicer solution to implement afterwards, I guess.


Maikel (developer)

Is this then resolved?


Apfelclonk (reporter)

Last edited: 2015-06-17 12:29

View 2 revisions

As long as nobody fixed this without updating this bug entry, no.
I only missunderstood Zapper in the way he proposed to fix this. The problem is still alive.


Maikel (developer)

Ah, I see, PV_Random does not have a seed.

Then we need a seed for that :)


occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:

Changeset 3d71dfb by David Dormagen <>
Particles: added a "seed" parameter to PV_Random (0001198)


Zapper (developer)

This is implemented via a seed for PV_Random now.

See the docs for an example:

-Issue History
Date Modified Username Field Change
2014-12-30 15:18 Apfelclonk New Issue
2014-12-30 22:11 Zapper Note Added: 0003299
2014-12-30 22:12 Zapper Note Edited: 0003299 View Revisions
2014-12-31 09:22 Apfelclonk Note Added: 0003300
2015-06-16 20:15 Maikel Note Added: 0003673
2015-06-16 20:15 Maikel Status new => feedback
2015-06-17 12:28 Apfelclonk Note Added: 0003677
2015-06-17 12:28 Apfelclonk Status feedback => new
2015-06-17 12:29 Apfelclonk Note Edited: 0003677 View Revisions
2015-06-17 19:55 Maikel Note Added: 0003678
2016-01-27 14:34 Maikel Product Version => 7.0
2016-01-27 14:34 Maikel Target Version => 7.2
2016-01-27 14:34 Maikel Summary Radial destribution for CreateParticles() => Radial distribution for CreateParticles()
2016-01-27 14:34 Maikel Assigned To => Zapper
2016-01-27 14:34 Maikel Status new => assigned
2016-01-29 16:27 Zapper Status assigned => new
2016-01-29 16:29 Zapper Assigned To Zapper =>
2016-02-27 11:40 occ Note Added: 0005004
2016-02-27 11:41 Zapper Note Added: 0005005
2016-02-27 11:41 Zapper Status new => resolved
2016-02-27 11:41 Zapper Resolution open => fixed
2016-02-27 11:41 Zapper Assigned To => Zapper
+Issue History