Graal Forums

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

pig132 09-19-2011 03:53 AM

Particle question
 
Okay so I've been toying around with particles and had alot of fun with them but one thing I can't seem to figure out how to do.

I'm looking to have it sortof pulse, and have 1 or 2 particles pulse in each direction (1degree) around the player. If that makes sense.

Like a pulse of a perfect circle made of particles pulse around the player.

Lol, sorry if this doesn't make sense.

Can I do that with a modifier? Multiple modifiers?

If anyone could help me or give me a push on how to do it that would be greatly appreciated. :D:D

jamitsu89 09-19-2011 02:54 PM

Couple questions:
Do you want them to circle the player, or do you want them to resonate out of the player in a circular formation?
And, if circling the player, do you mean pulse in terms of alpha or zoom?

EDIT
Also if circling the player, do you want it around their waist like a hula hoop orbital path, or lengthways around the player going around their head and feet.

pig132 09-19-2011 09:30 PM

I'm looking to have it resonate out in a circle, starting at where its created

pig132 09-20-2011 06:13 AM

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);
  }
 
  }




All times are GMT +2. The time now is 03:41 AM.

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