Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Flare
#1
Hello

I was bored this morning and decided to try with these kind of weapons, this is very simple but nice, Nyan Cat



Code:
Flare()
{
        while(1)
        {
        self giveWeapon("flare_mp",0,true);
        wait 0.5;
        self switchToWeapon("flare_mp",0,true);
        wait 0.1;
        self waittill( "weapon_fired" );
        if ( self getCurrentWeapon() == "flare_mp" )
        {
     FX = loadfx( "misc/flare_ambient_green" );
               MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
               f1 = SpawnFX(FX, self GetCursorPos());
               f2 = SpawnFX(FX, self GetCursorPos()+(0,-50,20));
               f3 = SpawnFX(FX, self GetCursorPos()+(0,50,10));
               f4 = SpawnFX(FX, self GetCursorPos()+(50,0,-20));
               f5 = SpawnFX(FX, self GetCursorPos()+(-50,0,-10));
               f6 = SpawnFX(FX, self GetCursorPos()+(0,0,15));
               TriggerFX(f1);
               TriggerFX(f2);
               TriggerFX(f3);
               TriggerFX(f4);
               TriggerFX(f5);
               TriggerFX(f6);
               wait 4;
               f1 delete();
               f2 delete();
               f3 delete();
               f4 delete();
               f5 delete();
               f6 delete();
        }
        wait 0.1;
        }
}

Add this if you dont have them:

Code:
getCursorPos()
{
    forward = self getTagOrigin("j_head");
    end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    return Crosshair;
}

vector_scal(vec, scale)
{
        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
        return vec;
}
Reply

#2
Waaaah, Nyan Cat is taking this board over.
Reply

#3
(05-01-2011, 23:58)SuperNovaAO Wrote: Waaaah, Nyan Cat is taking this board over.

Nyan Cat <-----He is the creator of this forum,Cool
Reply

#4
Nyan Cat <- new world order
Reply

#5
Nyan Cat <- the new Osama Binladen
Reply



Forum Jump:


Users browsing this thread:
3 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.