View Single Post
  #4  
Old 09-20-2011, 06:13 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Alright well, this is an example of what im looking to do. If you add this to an npc, when it explodes is what im looking to have it do. Except pulse like that around the x and y of the npc.

PHP Code:
function onPlayerChats()
{
  if (
player.account "pig132")
  {
    if (
player.chat "/d")
    {
      
destroy();
    }
  }
}
//#CLIENTSIDE
function onPlayerEnters()
{
with (findimg(1)) {
  
  
// Emitter attributes
  
layer 2;
  
emitter.delaymin 0.01;
  
emitter.delaymax 0.01;
  
emitter.nrofparticles 1;
  
emitter.maxparticles 75;

  
// Basic particle attributes
  
emitter.particle.lifetime 6;
  
emitter.particle.image "g4_particle_yellowlight.png";
  
emitter.particle.mode 0;
  
emitter.particle.alpha .5;
  
emitter.particle.zoom 1;
  
emitter.particle.red 1;
  
emitter.particle.green 1;
  
emitter.particle.blue 1;

  
// Movement
  
emitter.particle.angle pi 2;
  
emitter.particle.speed 3;
  
  
emitter.addlocalmodifier("add"00"angle""add"00);
  
emitter.addemitmodifier("impulse".115.115"angle""add"degtorad(90), degtorad(90)); 
  
//emitter.addlocalmodifier("range", 2, 4, "alpha", "replace", 0.99, 0);
  
emitter.addlocalmodifier("range"77"zoom""add"13);
  
//emitter.addlocalmodifier("once", 0, 0, "red", "add", 0, 1);
  //emitter.addlocalmodifier("once", 0, 0, "green", "add", 0, 1);
  //emitter.addlocalmodifier("once", 0, 0, "blue", "add", 0, 1);
  
emitter.addglobalmodifier("once"0.050.05"angle""add"degtorad(30), degtorad(30));
  for (
temp.0temp.<= 180temp.++)
  {
    
emitter.addglobalmodifier("once"0.050.05"angle""add"degtorad(temp.i), degtorad(temp.i));
    
player.chat "deg: " temp.i;
    
sleep(0.05);
  }
 
  }

Reply With Quote