View Single Post
  #1  
Old 02-05-2013, 01:18 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Gani Script Problem.

Is there any reason why this gani doesn't change color for other players? I.e. if I use it, it'll change from yellow to red, but on someone else's screen, it remains yellow. Been trying to get this dumb thing to work for two days now

Edit: Magically started working. Can't tell at this point if I'm going crazy or not.

PHP Code:
SCRIPT
if (created){
  
thiso.tu = 0;
  
onTimeout();
}
function 
onTimeout()
{ 
  
//thiso.tu is incremented at the very end.
  
if(thiso.tu < 5) thiso.tmod = 10*(1/3);
  else if(
thiso.tu < 9) thiso.tmod = 10*(2/3);
  else if(
thiso.tu == 10) thiso.tmod = 10;
  
with (findimg(200))
  {
    
spin = degtorad(0);
    
rotation = degtorad(0);

    
with (emitter)
    {
      
delaymin = 0.2-((0.1/10)*thiso.tmod);
      
delaymax = 0.2-((0.1/10)*thiso.tmod);
      
nrofparticles = 1+int(random(0,1)+.5);
      
emitautomatically = true;
      
autorotation = false;
      
firstinfront = true;
      
emissionoffset = {0,1.5,0};
      
attachposition = false;
      
checkbelowterrain = false;
      
continueafterdestroy = true;
      
attachtoowner = true;
      
maxparticles = 100000;

      
particleTypes = 1;

      
// Leaf
      
with (particles[0])
      {
        
image = "zod-j7energything.png";
        
zoom = 1;
        
red = 1;
        
green = 1-(0.1*thiso.tmod);
        
blue = 0;
        
alpha = 0;
        
mode = 0;
        
lifetime = 0.6 - ((0.2/10)*thiso.tu);
        
angle = degtorad(90);
        
zangle = degtorad(0);
        
speed = 5+thiso.tu;
        
rotation = degtorad(0);
        
spin = degtorad(0);
        
partx = 0;
        
party = 0;
        
partw = 0;
        
parth = 0;
        
stretchx = 0.8;
        
stretchy = 1.8;
        
sound = "";
        
layer = 2;
      }

      
addlocalmodifier("once", 0, 0, "x", "replace", player.x-1+1, player.x+1+1); // [Insert Name]
      
addlocalmodifier("once", 0, 0, "y", "replace", player.y+3, player.y+3); // [Insert Name]

      
addlocalmodifier("range", 0, 0.25, "alpha", "replace", 0, 0.5+((.5/10)*thiso.tmod)); // [Insert Name]
      
addlocalmodifier("range", 0.25, 0.6 - ((0.2/10)*thiso.tu), "alpha", "replace", 0.5+((.5/10)*thiso.tmod),0); // [Insert Name]

    
}
  }

  
with (findimg(202))
  {
    
spin = degtorad(0);
    
rotation = degtorad(0);
    
layer = 0;

    
with (emitter)
    {
      
delaymin = 0;
      
delaymax = 0;
      
nrofparticles = 1;
      
emitautomatically = true;
      
autorotation = false;
      
firstinfront = true;
      
emissionoffset = {0,0,0};
      
attachposition = false;
      
checkbelowterrain = false;
      
continueafterdestroy = false;
      
attachtoowner = true;
      
maxparticles = 1;

      
particleTypes = 1;

      
// Leaf
      
with (particles[0])
      {
        
image = "g4_particle_yellowlight.png";
        
zoom = 2;
        
red = 1;
        
green = 1 - (0.1 * thiso.tu);
        
blue = 0;
        
alpha = 1;
        
mode = 0;
        
lifetime = .1;
        
angle = degtorad(32);
        
zangle = degtorad(0);
        
speed = 0;
        
rotation = degtorad(0);
        
spin = degtorad(0);
        
partx = 0;
        
party = 0;
        
partw = 0;
        
parth = 0;
        
stretchx = 1;
        
stretchy = 1;
        
sound = "";
        
layer = 2;
      }

      
addlocalmodifier("once", 0, 0, "x", "replace", player.x-.5, player.x-.5); // [Insert Name]
      
addlocalmodifier("once", 0, 0, "y", "replace", player.y+.5, player.y+.5); // [Insert Name]
    
}
  }
  
setTimer(.1);
  if (
thiso.tu < 10) thiso.tu++;
}

SCRIPTEND 
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote