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", 0, 0, "angle", "add", 0, 0);
emitter.addemitmodifier("impulse", .115, .115, "angle", "add", degtorad(90), degtorad(90));
//emitter.addlocalmodifier("range", 2, 4, "alpha", "replace", 0.99, 0);
emitter.addlocalmodifier("range", 7, 7, "zoom", "add", 1, 3);
//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.05, 0.05, "angle", "add", degtorad(30), degtorad(30));
for (temp.i = 0; temp.i <= 180; temp.i ++)
{
emitter.addglobalmodifier("once", 0.05, 0.05, "angle", "add", degtorad(temp.i), degtorad(temp.i));
player.chat = "deg: " @ temp.i;
sleep(0.05);
}
}
}