Thread: emitters
View Single Post
  #8  
Old 06-26-2006, 09:05 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
To control the movement, you can:

use the zangle to make all particle movement upwards (set it to emitter.particle.zangle = 1; ) or downwards (-1).

use 'speed' to control the rate the particles move in whatever dir it is (emitter.particle.speed = x; at x tiles/second).



And there's other stuff too, but from what I was told Stefan made this weapon NPC so I'm sure it may help you. This code is for a falling leaves effect:

PHP Code:
     // Falling leaves

          // Emitter attributes
          
layer 2;
          
emitter.delaymin 0.1;
          
emitter.delaymax 0.3;
          
emitter.nrofparticles 2;
          
emitter.emissionoffset = {0, -510};
          
emitter.checkbelowterrain true;

          
// Basic particle attributes
          
emitter.particle.lifetime 10;
          
emitter.particle.image "g4_particle_leaf.png";

          
// Movement
          
emitter.particle.zangle = -1;
          
emitter.particle.speed 2;
          
emitter.particle.alpha 0.75;
          
emitter.particle.mode 1;

          
emitter.addglobalmodifier("impulse"0.20.2"zangle""multiply"0.950.95);
          
emitter.addlocalmodifier("once"00"rotation""replace"02*pi);
          
emitter.addlocalmodifier("once"00"angle""replace"degtorad(200), degtorad(260));
          
emitter.addlocalmodifier("once"00"x""add", -1025);
          
emitter.addlocalmodifier("once"00"zoom""replace"0.61.2);
          
emitter.addlocalmodifier("once"00"green""replace"0.51);
          
emitter.addglobalmodifier("impulse"0.20.2"spin""multiply"0.60.6);
          
emitter.addlocalmodifier("range"0100000"speed""add"33);
          
with (emitter.addlocalmodifier("impulse"12"spin""add", -20, -30)) {
            
addmod("zangle""add"0.10.5);
          } 
Reply With Quote