stinger_m/zscript/gatling.zsc
Marisa Kirisame fae4f6d50b Partially implemented Stunner and Impaler (very unfinished).
Switched Impaler fire sound to something more appropriate (proto Skaarj fire).
Add slot priorities to all weapons, final weapons come first.
Adjust hud behavior to properly draw ammo bars by the order of their weapons.
2019-09-16 00:38:38 +02:00

98 lines
1.8 KiB
Text

Class SMiniAmmo : Ammo
{
Default
{
Inventory.Icon "I_SMini";
Inventory.Amount 4;
Inventory.MaxAmount 16;
Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 32;
}
override bool TryPickup( in out Actor toucher )
{
if ( !sting_dubious ) return false; // not allowed
return Super.TryPickup(toucher);
}
override void Tick()
{
Super.Tick();
if ( sting_dubious ) return;
if ( Owner ) Owner.RemoveInventory(self);
Destroy();
}
}
Class SMiniBlast : Actor
{
}
Class SMiniGun : UnrealWeapon
{
override bool TryPickup( in out Actor toucher )
{
if ( !sting_dubious ) return false; // not allowed
return Super.TryPickup(toucher);
}
override void Tick()
{
Super.Tick();
if ( sting_dubious ) return;
if ( !Owner )
{
let r = Spawn("BFG9000",pos,ALLOW_REPLACE);
r.spawnangle = spawnangle;
r.spawnpoint = spawnpoint;
r.angle = angle;
r.pitch = pitch;
r.roll = roll;
r.special = special;
r.args[0] = args[0];
r.args[1] = args[1];
r.args[2] = args[2];
r.args[3] = args[3];
r.args[4] = args[4];
r.ChangeTid(tid);
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
r.HandleSpawnFlags();
r.SpawnFlags = SpawnFlags;
r.bCountSecret = SpawnFlags&MTF_SECRET;
r.vel = vel;
r.master = master;
r.target = target;
r.tracer = tracer;
r.bDropped = bDropped;
Destroy();
}
else
{
Owner.RemoveInventory(self);
Destroy();
}
}
Default
{
Tag "$T_SMINI";
Inventory.PickupMessage "$I_SMINI";
Weapon.UpSound "smini/select";
Weapon.SlotNumber 0;
Weapon.SelectionOrder 1;
Weapon.SlotPriority 0.9;
Weapon.AmmoType "SMiniAmmo";
Weapon.AmmoUse 1;
Weapon.AmmoType2 "SMiniAmmo";
Weapon.AmmoUse2 4;
Weapon.AmmoGive 8;
Inventory.RespawnTics 2100;
+INVENTORY.IGNORESKILL;
+WEAPON.NOAUTOFIRE;
UTWeapon.DropAmmo 4;
}
States
{
Spawn:
SMIP A -1;
Stop;
SMIP B -1;
Stop;
}
}