|
Varia Developer
|
 |
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
|
|
Gassy!!!
PHP Code:
//#CLIENTSIDE
// Made by Mr. Omega
//Inspired by a script of Napo
function onCreated() {
onTimeOut();
this.on = 0;
}
function onWeaponFired() {
if ( this.on == 0)
{
this.on = 1;
with ( findimg( 200)) {
layer = 2;
emitter.delaymin = 0.1;
emitter.delaymax = 0.5;
emitter.nrofparticles = 1;
emitter.particle.lifetime = 3;
emitter.particle.image = "g4_particle_smoke.png";
emitter.particle.mode = 1;
emitter.particle.red = 0;
emitter.particle.green = 1;
emitter.particle.blue = 0;
emitter.particle.alpha = 0.6;
emitter.particle.zoom = 0.5;
emitter.particle.speed = 4;
emitter.addglobalmodifier("range", 0, 1000, "movex", "add", -4, -10);
emitter.addglobalmodifier("impulse", 0.2, 0.2, "spin", "multiply", 0.9, 0.9);
emitter.addlocalmodifier("once", 0, 0, "angle", "add", -0.2, 0.2);
emitter.addlocalmodifier("once", 0, 0, "rotation", "replace", 0, 2*pi);
emitter.addlocalmodifier("range", 1, 3, "alpha", "replace", 0.6, 0);
emitter.addlocalmodifier("range", 0, 3, "zoom", "add", 0.5, 0.25);
emitter.addlocalmodifier("range", 0, 0.5, "speed", "replace", 8, 4);
emitter.addlocalmodifier("range", 0.5, 3, "speed", "replace", 4, 1.5);
emitter.addlocalmodifier("once", 0, 0, "spin", "replace", 2, 4);
}
}
else if ( this.on == 1)
{
hideImg( 200);
this.on = 0;
}
}
function onTimeOut() {
if (this.on == 1)
{
with( findImg( 200)) {
if (player.dir == 0)
{
x = player.x-0.5;
y = player.y+1;
layer = 2;
emitter.particle.angle = pi*3/2;
}
if (player.dir == 1)
{
x = player.x+1;
y = player.y+0.3;
layer = 2;
emitter.particle.angle = 0;
}
if (player.dir == 2)
{
x = player.x-0.3;
y = player.y-0.5;
layer = 0;
emitter.particle.angle = pi/2;
}
if (player.dir == 3)
{
x = player.x-2;
y = player.y+0.3;
layer = 2;
emitter.particle.angle = pi;
}
}
}
setTimer( 0.05);
}
Just press D to use it ;]
Here's a vid of what it does. |
__________________
Deep into the Darkness peering...
|
Last edited by Angel_Light; 07-24-2007 at 04:59 PM..
|