Holster Weapon

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Holster Weapon

Re: Holster Weapon

by Marisa the Magician » Fri Mar 02, 2018 1:52 pm

Yes, it does.

Re: Holster Weapon

by AFADoomer » Fri Mar 02, 2018 1:09 pm

Good point. That would be far easier.

Does that allow the player to switch back to another weapon, though? It's been a while since I checked, so I could be mis-remembering, but I thought that caused issues with weapon switching...

Re: Holster Weapon

by Marisa the Magician » Fri Mar 02, 2018 10:34 am

Actually, just setting the owner's pending weapon to null works too.

Re: Holster Weapon

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.

Re: Holster Weapon

by Rachael » Fri Mar 02, 2018 9:19 am

I think the best way to do this is to have a "null weapon" which can be defined by the mod, itself. I am not sure how much merit this would really have as an engine feature.

Holster Weapon

by Zenon » Fri Mar 02, 2018 9:17 am

Just thought it would be a neat idea to have a holster weapon function
It could be implemented someway in a mod or something

On an unrelated note, does anybody else find it awkward talking to a friendly NPC while holding a gun up to their face?
Spoiler:

Top