Author Topic: shot gun/flame thrower  (Read 1507 times)

hey can som1 send me a code or teach me how to make a shot gun and flame thrower? :cookieMonster:

also how can i change the spread and how fast a machine gun shoots

A flamethrower and a shotgun have already been made if you'd rather just download those.

A flamethrower and a shotgun have already been made if you'd rather just download those.
no i'm making a pack and i don't want to just replace their scripts

For the flamethrower, try looking at the Spray Can scripts for Blockland v0002.

A flamethrower and a shotgun have already been made if you'd rather just download those.
no i'm making a pack and i don't want to just replace their scripts

That wasn't what I was suggesting...

For a shotgun, you would need to use a custom firing script to shoot multiple bullets with a slight spread.
Try
Code: [Select]
function yourgunimage::onfire(%this,%obj,%slot)
{
    %dir=%obj.getmuzzlevector(%slot);
    %pos=%obj.getmuzzlepoint(%slot);
    %spread=0.1;
    for(%i=0;%i<5;%i++)
    {
        %p=new projectile()
        {
            initialvelocity=vectorscale(vectoradd(%dir,vectorscale(getrandom(-100,100) SPC getrandom(-100,100) SPC getrandom(-100,100),0.01*%spread)),%this.projectile.muzzlevelocity);
            datablock=%this.projectile;
            initialposition=%pos;
            sourceobject=%obj;
            sourceslot=%slot;
            client=%obj.client;
        };
        missioncleanup.add(%p);
    }
}

A flamethrower and a shotgun have already been made if you'd rather just download those.
no i'm making a pack and i don't want to just replace their scripts

But you want us to make more scripts for you.

dr bling: I did say send me or teach me either is fine

space guy: thank you EDIT:but i cant find it in my blockland

hammerdwarf: would i put that script in somewhere in my firing weapon script or would i just take that script alone?
« Last Edit: June 25, 2008, 12:23:00 AM by tater8q3 »

You would want to put that at the end of your firing weapon script.

You can't make a good weapon with no knowledge how to overnight and this section will get annoyed at explaining everything you can easily figure out yourself.

What I reccomend is messing around with variables and comparing weapon scripts and how they act. That's how I started self teaching myself how to make balanced weapons.

hammerdwarf ty for the script

dr bling ty for telling me where to to put the script

:cookieMonster: CAN SOM1 SEND ME A FLAMETHROWER SCRIPT :cookieMonster:

EDIT: or freaking tell me how
« Last Edit: July 03, 2008, 09:00:20 PM by tater8q3 »