Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-19-2011, 03:53 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
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.
Reply With Quote
  #2  
Old 09-19-2011, 02:54 PM
jamitsu89 jamitsu89 is offline
Registered User
Join Date: Jun 2011
Posts: 27
jamitsu89 is an unknown quantity at this point
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.
Reply With Quote
  #3  
Old 09-19-2011, 09:30 PM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
I'm looking to have it resonate out in a circle, starting at where its created
Reply With Quote
  #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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:43 PM.


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