Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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 5thiso.tmod 10*(1/3);
  else if(
thiso.tu 9thiso.tmod 10*(2/3);
  else if(
thiso.tu == 10thiso.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"00"x""replace"player.x-1+1player.x+1+1); // [Insert Name]
      
addlocalmodifier("once"00"y""replace"player.y+3player.y+3); // [Insert Name]

      
addlocalmodifier("range"00.25"alpha""replace"00.5+((.5/10)*thiso.tmod)); // [Insert Name]
      
addlocalmodifier("range"0.250.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 - (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"00"x""replace"player.x-.5player.x-.5); // [Insert Name]
      
addlocalmodifier("once"00"y""replace"player.y+.5player.y+.5); // [Insert Name]
    
}
  }
  
setTimer(.1);
  if (
thiso.tu 10thiso.tu++;
}

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:15 AM.


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