Code: Select all
Class MicroUzi : Weapon
{
int firemode;
Default
{
obituary "%o was peppered by %k's micro-uzi.";
radius 20;
height 16;
attacksound "MicroUzi/Fire";
inventory.pickupmessage "You got the micro-uzi!";
weapon.kickback 15;
weapon.ammotype "LA";
weapon.ammouse 1;
weapon.ammogive 40;
weapon.ammotype2 "LA";
weapon.ammouse2 1;
weapon.ammogive2 0;
Decal "BulletChip";
Scale 0.75;
}
states
{
Ready:
MUZI A 1
{
A_Raise(12);
invoker.firemode=0;
}
loop;
Deselect:
MUZI A 1 A_Lower(20);
loop;
Select:
MUZI A 1 A_Raise(12);
loop;
Fire:
MUZI A 0
{
if (invoker.firemode=1)
return ResolveState("BurstFire");
return ResolveState(null);
}
MUZI B 2 A_FireBullets (6, 4, -1, 16, "BulletPuff");
MUZI A 0 A_Recoil(0.4);
MUZI A 0 A_GunFlash;
MUZI A 1 A_SetPitch(pitch-0.25);
MUZI B 1 A_ReFire;
Goto Ready;
BurstFire:
MUZI A 0
{
if (invoker.firemode=0)
return ResolveState("Fire");
return ResolveState(null);
}
MUZI B 2 A_FireBullets (6, 4, -1, 16, "BulletPuff");
MUZI A 0 A_Recoil(0.4);
MUZI A 0 A_GunFlash;
MUZI A 1 A_SetPitch(pitch-0.25);
MUZI B 2 A_FireBullets (6, 4, -1, 16, "BulletPuff");
MUZI A 0 A_Recoil(0.4);
MUZI A 0 A_GunFlash;
MUZI A 1 A_SetPitch(pitch-0.25);
MUZI B 2 A_FireBullets (6, 4, -1, 16, "BulletPuff");
MUZI A 0 A_Recoil(0.4);
MUZI A 0 A_GunFlash;
MUZI A 1 A_SetPitch(pitch-0.25);
MUZI A 9;
MUZI B 1 A_ReFire;
Goto Ready;
AltFire:
MUZI A 0
{
if (invoker.firemode=0)
invoker.firemode=1;
Console.Printf("Burst firemode");
return ResolveState("Ready");
invoker.firemode=0;
Console.Printf("Auto firemode");
return ResolveState("Ready");
}
Goto Ready;
Flash:
TNT1 A 2 bright A_Light1;
TNT1 A 2 bright A_Light2;
TNT1 A 0 bright A_Light0;
stop;
Spawn:
MUZP A -1;
stop;
}
}
