by AFADoomer » Fri Mar 02, 2018 10:26 am
We use something like this in Blade of Agony:
Code: Select all
class NullWeapon : Weapon
{
Default
{
+INVENTORY.UNDROPPABLE
+WEAPON.NOALERT
Weapon.SelectionOrder 99999; // Make this absolutely last in weapon priority
}
States
{
Select:
TNT1 A 1 A_Raise;
Loop;
Deselect:
TNT1 A 1 A_Lower;
Loop;
Fire:
Ready:
TNT1 A 1 A_WeaponReady(WRF_NOFIRE);
Loop;
}
}
(ours has some extra handling built in, but this is the core part that does what you're asking about)
Then, in the player class, we have it assigned to weapon slot 0. So pressing zero, or switching to NullWeapon in ACS lowers your weapon.
We use something like this in Blade of Agony:[code=php]class NullWeapon : Weapon
{
Default
{
+INVENTORY.UNDROPPABLE
+WEAPON.NOALERT
Weapon.SelectionOrder 99999; // Make this absolutely last in weapon priority
}
States
{
Select:
TNT1 A 1 A_Raise;
Loop;
Deselect:
TNT1 A 1 A_Lower;
Loop;
Fire:
Ready:
TNT1 A 1 A_WeaponReady(WRF_NOFIRE);
Loop;
}
} [/code](ours has some extra handling built in, but this is the core part that does what you're asking about)
Then, in the player class, we have it assigned to weapon slot 0. So pressing zero, or switching to NullWeapon in ACS lowers your weapon.