Earlier today Skyld said he doesn't know much about particles, an Stefans stuff worked but then it got screwy so I cahnged and then it came up with the errors, so I think I need Stefan to actually look at this on RC.
Go on Graal Legacy and look at "Switch/Test" @ Stefan
Or someone can look at it and toy around with it on their server.
PHP Code:
//#CLIENTSIDE
function onCreated() {
CreateEmitters();
}
function CreateEmitters() {
with (findImg( 200)) {
layer = 2;
with (emitter) {
delaymin = 5;
delaymax = 5;
nrofparticles = 1;
maxparticles = 75;
emissionoffset = {0,0,0};
firstinfront = false;
attachposition = true;
particle.speed = 2;
particle.lifetime = 5;
particle.image = "g4_particle_whitespot.png";
particle.alpha = .99;
particle.zoom = 2;
particle.red = .92;
particle.green = .26;
particle.blue = .52;
particle.stretchx = 1;
particle.stretchy = 1;
addlocalmodifier("range",0,12,"alpha","replace",1,0);
addlocalmodifier("range",0,12,"zoom","replace",2,0);
}
}
}
function onWeaponFired() {
this.on = 1 - this.on;
if (this.on == 1) {
setTimer(0.05);
}
if (this.on == 0){
setTimer(0);
}
}
function onTimeOut() {
with (findimg(200)) {
layer = 2;
x = random(0,60);
y = random(0,60);
emitter.emit();
}
setTimer(0.05);
}