Code here:
Code: Select all
Class TriRevolver : Weapon
{
int TriMode;
Default{
Weapon.SelectionOrder 2000;
Weapon.AmmoUse 1;
+WEAPON.NOAUTOAIM
Weapon.BobRangeX 0.0;
Weapon.BobRangeY 0.1;
Weapon.SlotNumber 2;
Weapon.AmmoGive 20;
Weapon.AmmoType "Clip";
Inventory.PickupMessage "You got the TriRevolver";
Obituary "%o was mowed down by %k's TriRevolver";
Tag "$TAG_PISTOL";
}
States
{
Ready:
TRVL A 1 A_WeaponReady;
Loop;
Deselect:
TNT1 A 0
{
invoker.TriMode = 0;
}
TRVL A 1 A_Lower;
Loop;
Select:
TNT1 A 0
{
invoker.TriMode = 0;
}
TRVL A 1 A_Raise;
Loop;
Fire:
TRVL A 1 A_JumpIf(invoker.TriMode == 1,"Fire1");
TRVL A 0 Bright A_FireBullets (2, 2, 1, 70, "TriPuff");
TRVL AA 0 Bright A_FireBullets (5, 5, 1, 50, "TriPuff");
TRVL A 1 A_PlaySound("weapons/pistol", CHAN_WEAPON);
TRVL A 0 A_GunFlash;
TNT1 A 0 A_Quake (6, 2, 0, 4);
TRVL ABCD 2 A_SetPitch (pitch-2);
TRVL B 7;
TRVL A 19;
TRVL A 5 A_ReFire;
Goto Ready;
Fire1:
TRVL A 2 Bright A_FireBullets (5, 5, 1, 50, "TriPuff");
TNT1 A 1 A_Quake (6, 2, 0, 4);
TRVL A 0 A_SetPitch (pitch-2);
TRVL A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON);
TRVL A 2 Bright A_FireBullets (5, 5, 1, 50, "TriPuff");
TNT1 A 1 A_Quake (6, 2, 0, 4);
TRVL A 0 A_SetPitch (pitch-2);
TRVL A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON);
TRVL A 2 Bright A_FireBullets (5, 5, 1, 50, "TriPuff");
TNT1 A 1 A_Quake (6, 2, 0, 4);
TRVL A 0 A_SetPitch (pitch-2);
TRVL A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON);
TRVL A 0 A_GunFlash;
TRVL ABCD 2;
TRVL B 7;
TRVL A 19;
TRVL A 5 A_ReFire;
Goto Ready;
AltFire:
TRVL A 1 {
if (invoker.TriMode == 0){ invoker.TriMode = 1;}}
TRVL A 1 A_JumpIf(invoker.TriMode == 1,"Ready");
Goto Ready;
Spawn:
PIST A -1;
Stop;
}
}