flak_m/zscript/sniperrifle.zsc
Marisa Kirisame ee827408b1 Begin work on Sniper Rifle and Rocket Launcher (animations are in, but they're not functional).
Tweaked weapon offsets yet again so they look a bit nicer (especially scale-wise).
2018-05-28 20:55:13 +02:00

104 lines
1.5 KiB
Text

Class RifleAmmo : Ammo
{
Default
{
Tag "Box of Rifle Rounds";
Inventory.PickupMessage "You picked up a Box of Rifle Rounds.";
Inventory.Amount 10;
Inventory.MaxAmount 50;
Ammo.BackpackAmount 20;
Ammo.BackpackMaxAmount 50;
Ammo.DropAmount 10;
}
States
{
Spawn:
SBOX A -1;
Stop;
}
}
Class RifleAmmo2 : RifleAmmo
{
Default
{
Tag "Rifle Round";
Inventory.PickupMessage "You got a Rifle Round.";
Inventory.Amount 1;
Ammo.DropAmount 1;
}
States
{
Spawn:
SRND A -1;
Stop;
}
}
Class SniperRifle : UTWeapon
{
Default
{
Tag "Sniper Rifle";
Inventory.PickupMessage "You got the Sniper Rifle.";
Weapon.UpSound "sniper/select";
Weapon.SlotNumber 0;
Weapon.SelectionOrder 5;
Weapon.AmmoType "RifleAmmo";
Weapon.AmmoUse 1;
Weapon.AmmoType2 "RifleAmmo";
Weapon.AmmoUse2 1;
Weapon.AmmoGive 8;
}
States
{
Spawn:
SRFP A -1;
Stop;
SRFP B -1;
Stop;
Select:
SRFS A 1 A_Raise(int.max);
Wait;
Ready:
SRFS A 1;
SRFS B 2;
SRFS C 1;
SRFS D 2;
SRFS E 1;
SRFS F 2;
SRFS G 1;
SRFS H 2;
SRFS I 1;
SRFS J 2;
SRFS K 1;
SRFS L 2;
SRFS M 1;
SRFS N 2;
SRFS O 1;
SRFS P 2;
SRFS Q 1;
Idle:
SRFI A 1
{
A_CheckReload();
A_WeaponReady();
}
Wait;
Fire:
SRF1 ABCDEFGHIJ 2;
Goto Idle;
SRF2 ABCDEFGHIJ 2;
Goto Idle;
SRF3 ABCDEFGHIJ 2;
Goto Idle;
SRF4 ABCDEFGHIJ 2;
Goto Idle;
SRF5 ABCDEFGHIJ 2;
Goto Idle;
Deselect:
SRFD ABCDEFG 2;
SRFD G 1 A_Lower(int.max);
Wait;
}
}