View Single Post
  #3  
Old 05-28-2009, 08:22 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Could be because you're editting the emitter object outside of the image object's scope.

As an edit to Tig's suggestion:

PHP Code:
//#CLIENTSIDE

function onTimeout() 

{

 
findImg(200).x = player.x;

 
findImg(200).y = player.y;

 
this.setTimer(0.05);

}

function 
onCreated() 

{

 
findImg(200).x = player.x;

 
findImg(200).y = player.y;

 
this.setTimer(0.05);

 
layer = 3;
    
  
with(findimg(200)) 
  {
     
with (emitter) 

     {

      
delaymin = 0.05;

      
delaymax = 0.05;

      
nrofparticles = 6;

      
maxparticles = 260;



      
with (particle)

      {

       
angle = pi / 2;

       
lifetime = 4;

       
image = "light2s.png";

       
red = 0.85;

       
green = 0.09;

       
blue = 0.03;

       
alpha = 0.99;

       
speed = 0.35;

      }

      
removeModifiers();
      
removeParticles();

      
addlocalmodifier("impulse", 0, 0, "angle", "add", -0.04, 0.04);

      
addlocalmodifier("once", 0, 0, "x", "add", 0, 0.65);

      
addlocalmodifier("range", 0.5, 4, "alpha", "replace", 0.99, 0);

      
addlocalmodifier("range", 0.4, 4, "zoom", "replace", 0.6, 0);

      
addlocalmodifier("range", 0.2, 4, "speed", "replace", 0.5, 4);

     }
  }
} 
Reply With Quote