Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Emitters (https://forums.graalonline.com/forums/showthread.php?t=68357)

Twinny 08-26-2006 07:32 AM

Emitters
 
Simple emitters script some people may find cool / handy
PHP Code:

/* Made by Twinny for Open Source use */
/* If someone asks you for this script */
/* You must give it to them */

//#CLIENTSIDE
function onCreated()
{
  
makeemitter();
  
setTimer(0.05);
}

function 
makeemitter() 
{
  
with (findimg(1)) 
  {
    
mousex 1.5;  
    
mousey 1.5;
    
layer 1;

    
emitter.attachposition false
    
emitter.delaymin .1;
    
emitter.delaymax .3;
    
emitter.maxparticles 250;
    
emitter.nrofparticles 5;
    
emitter.particle.lifetime 10;

    
emitter.particle.speed 2;
    
emitter.particle.spin 5;
    
emitter.particle.image "g4_particle_x.png";  //Replace with whatever
   
    
emitter.particle.angle 2.3;
    
emitter.particle.zoom  .3;
    
emitter.particle.alpha 1;    

    
emitter.addLocalModifier("impulse"01"angle""replace"0,2);
    
emitter.addLocalModifier("range"03"alpha""replace"10);
    
emitter.addlocalmodifier("range",0,20,"speed","add",2,20);
   
    
emitter.emit();
    }
}

function 
onTimeout() 
{
  
showimg(1,"",mousex-1.5,mousey-1.5);
  
setTimer(0.05);




All times are GMT +2. The time now is 02:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.