Frictional Games Forum (read-only)
[PRTL ED] Random directions for FixedAxis particles? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [PRTL ED] Random directions for FixedAxis particles? (/thread-19349.html)



Random directions for FixedAxis particles? - MyRedNeptune - 11-25-2012

The title is pretty self-explanatory. The FixedAxis setting aligns all particles in the same direction, but I would like my particles to face random directions. Is it possible to do that?


RE: Random directions for FixedAxis particles? - palistov - 11-25-2012

Yeah, but you need to rotate the areas at which you spawn the particles at.

For an area named something like ParticleArea instead create X number of areas, index them ParticleArea_1, ParticleArea_2, ..., ParticleArea_X and then in your script spawn it randomly with something like this:

PHP Code:
const int X 5// 5 different directions
void SpawnParticle() {
  
int i RandInt(1X);
  
string area "ParticleArea_"+i;
  
// Create particle system here, I can't remember the function off the top of my head
  // Just use the local 'area' variable




RE: Random directions for FixedAxis particles? - MyRedNeptune - 11-25-2012

I see, so I have to do it that way after all. I was hoping there'd just be a check box to tick somewhere. Tongue

Thanks! Big Grin