Hey, I am trying to re-create my favourite hobby, ARC Welding.
I am wondering how I could create the "sparks" that fly off though.
Here is the basics of my script so far.
PHP Code:
//#CLIENTSIDE
function onCreated() {
hideimgs(200, 500000);
this.indexn = 200;
onTimeout();
}
function onMouseDown(var) {
if (var == "left") {
this.mode = "on";
}
}
function onMouseUp(var) {
if (var == "left") {
this.mode = "off";
}
}
function onTimeout() {
if (this.mode == "on") {
this.indexn += 1;
showimg(this.indexn, "g4_particle_sun.png", mousex - 2, mousey - 2);
findimg(this.indexn).zoom = random(0.2, 0.3);
findimg(this.indexn).red = 1;
findimg(this.indexn).green = 1;
findimg(this.indexn).blue = 1;
}
settimer(0.05);
}
Maybe some kind of particle emmiter would do the job.