#ak105 jamming test mod

1 messages · Page 1 of 1 (latest)

final raptor
#

Yeah, it's annoying that weapons have a very limited script interface.

prisma flume
#

100%

final raptor
#

The current approach I went is overriding the command handler:

//------------------------------------------------------------------------------------------------
//! Add flag for enabling/disable HandleWeaponFire
modded class SCR_CharacterCommandHandlerComponent : CharacterCommandHandlerComponent
{
    protected bool m_bACE_CanHandleWeaponFire = true;
    protected bool m_bACE_ForceWeaponFire = false;
    
    //------------------------------------------------------------------------------------------------
    override bool HandleWeaponFire(CharacterInputContext pInputCtx, float pDt, int pCurrentCommandID)
    {
        if (!m_bACE_CanHandleWeaponFire)
            return false;
        
        if (m_bACE_ForceWeaponFire)
        {
            if (pInputCtx.WeaponIsRaised())
                pInputCtx.SetWeaponPullTrigger(true);
                
            m_bACE_ForceWeaponFire = false;
        }
        
        return HandleWeaponFireDefault(pInputCtx, pDt, pCurrentCommandID);
    }
    
    //------------------------------------------------------------------------------------------------
    void ACE_SetCanHandleWeaponFire(bool canHandle)
    {
        m_bACE_CanHandleWeaponFire = canHandle;
    }
    
    //------------------------------------------------------------------------------------------------
    void ACE_ForceWeaponFire()
    {
        m_bACE_ForceWeaponFire = true;
    }
}
prisma flume
#

i had plans for stuff like random cooking if gun was overheating . barrel related changes and so on but its so limited :/

final raptor
#

But the force weapon fire for cookoffs will only work when the weapon is not lowered that way...

prisma flume
#

i really wish we had more option to modify how the gun stuff works

#

did had working overheating barrel but without cooking and randomyl changing fire rate and such it was just a no go :/

#

iwish we could do as much as with a3

wispy socket
#

Its important in these situations to make feature requests on the tracker.

Klamacz stated in one of the podcasts that he did want weapon overheating and jamming but its all down to time constraints and resources.

If you make a detailed post about what values/access you'd like, hopefully there might be some traction!

plush beacon
#

Oooh is that the helmet cam mod in that video?

feral imp
#

Jamming not so much it requires an animation chance

#

Which if not done correctly could make game go

final raptor
#

Not really, jamming can be easily implemented by suppressing the fire command handler or keybind. As others have said, cookoff is the main problem, as there isn't a proper way to force a weapon to fire from script.

gilded compass