Hello,
I had looked over the scripts and I do not see a way to simply tell a WeaponComponent to fire the weapon. Could this be implemented at a later stage?
Hello,
I had looked over the scripts and I do not see a way to simply tell a WeaponComponent to fire the weapon. Could this be implemented at a later stage?
There are some indirect approaches via character command handler to force weapon fire:
//------------------------------------------------------------------------------------------------ modded class SCR_CharacterCommandHandlerComponent : CharacterCommandHandlerComponent { protected bool m_bACE_ForceWeaponFire = false; //------------------------------------------------------------------------------------------------ override bool HandleWeaponFire(CharacterInputContext pInputCtx, float pDt, int pCurrentCommandID) { if (m_bACE_ForceWeaponFire) { if (pInputCtx.WeaponIsRaised()) pInputCtx.SetWeaponPullTrigger(true); m_bACE_ForceWeaponFire = false; } return HandleWeaponFireDefault(pInputCtx, pDt, pCurrentCommandID); } //------------------------------------------------------------------------------------------------ void ACE_ForceWeaponFire() { m_bACE_ForceWeaponFire = true; } }
However, this approach does not work when the weapon is lowered, so it's not good for features like weapon cook-off.