PDA

View Full Version : Particles Help.


zephirot
08-09-2006, 02:36 AM
Well, I need help.

//#CLIENTSIDE
function startEffect(effectnum) {
hideimgs(200, 300);

switch (effectnum) {
case 1: {
with (findimg(200)) {
// Smoke

// Emitter attributes
layer = 2;
emitter.delaymin = 0.05;
emitter.delaymax = 0.05;
emitter.nrofparticles = 1;
emitter.firstinfront = false;

// Basic particle attributes
emitter.particle.lifetime = 5;
emitter.particle.image = "g4_particle_smoke.png";
emitter.particle.mode = 1; // alpha transparent
emitter.particle.alpha = 0.8;
emitter.particle.zoom = 1;

// Movement
emitter.particle.angle = pi;
emitter.particle.speed = 8;
emitter.addlocalmodifier("once", 0, 0, "angle", "replace", pi - 0.2, pi + 0.2);
emitter.addlocalmodifier("once", 0, 0, "rotation", "replace", 0, 2*pi);
emitter.addlocalmodifier("range", 0, 1, "alpha", "replace", 0.4, 0.6);
emitter.addlocalmodifier("range", 1, 5, "alpha", "replace", 0.6, 0);
emitter.addlocalmodifier("range", 0, 5, "zoom", "add", 0.25, 0.25);
emitter.addlocalmodifier("range", 0, 0.5, "speed", "replace", 12, 4);
emitter.addlocalmodifier("range", 0.5, 3, "speed", "replace", 4, 1.5);
emitter.addlocalmodifier("once", 0, 0, "spin", "replace", 2, 4);
emitter.addglobalmodifier("impulse", 0.2, 0.2, "spin", "multiply", 0.9, 0.9);
}

Also tried


//#CLIENTSIDE
function startEffect(effectnum) {
hideimgs(200, 300);

switch (effectnum) {
case 7: {
// Tornado
with (findimg(200)) {
// Emitter attributes
layer = 2;
emitter.delaymin = 0.1;
emitter.delaymax = 0.2;
emitter.nrofparticles = 1;
emitter.emissionoffset = {0, 0, 0};

// Basic particle attributes
emitter.particle.lifetime = 5;
emitter.particle.image = "g4_particle_tornado.png";
emitter.particle.mode = 1;
emitter.particle.alpha = 0.2;
emitter.particle.zoom = 1.5;

emitter.particle.zangle = 1;
emitter.particle.angle = 0;
emitter.particle.speed = 6;
emitter.particle.stretchy = 0.7;
emitter.particle.spin = 9;
emitter.addglobalmodifier("range", 0, 10000, "angle", "add", 4, 4);
emitter.addlocalmodifier("range", 0, 2.5, "zoom", "add", 0.4, 0.4);
emitter.addlocalmodifier("range", 2.5, 5, "zoom", "add", 1, 1);
emitter.addlocalmodifier("range", 0, 0.5, "alpha", "replace", 0.2, 0.99);
emitter.addlocalmodifier("range", 4, 5, "alpha", "replace", 0.99, 0);
}
break;
}

Whats wrong >_<