Thread: Virtual Welding
View Single Post
  #1  
Old 11-29-2011, 11:14 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Virtual Welding

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(200500000);
  
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 2mousey 2);
    
findimg(this.indexn).zoom random(0.20.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.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote