1
Modding / [Coding Inquiry]: When ship system is active, prevent a beam weapon from firing
« on: December 06, 2018, 12:14:05 PM »
(Moved as separate topic as per Alex's request)
So I'm mucking around with a built-in beam weapon that works like your typical TacLaser; it's a sustained beam with only chargeup & chargedown values, but null for burst size & burst delay (meaning that it fires without stuttering as long as LMB is held down).
A ship system (based off Tartiflette's DiableAvionics Versant transformation) is supposed to, when toggled on, lock out the beam weapon from firing. The original code made use of setRemainingCooldownTo(1) every frame to constantly keep the weapon on cooldown, which I assumed relates to a weapon's chargedown value... but apparently that only applies to projectile weapons, not beam weapons.
I'd rather not have to use disable() and repair(), as those methods work like weapon malfunctions (and thus render horrible smoke particles & sparks).
Any ideas?
So I'm mucking around with a built-in beam weapon that works like your typical TacLaser; it's a sustained beam with only chargeup & chargedown values, but null for burst size & burst delay (meaning that it fires without stuttering as long as LMB is held down).
A ship system (based off Tartiflette's DiableAvionics Versant transformation) is supposed to, when toggled on, lock out the beam weapon from firing. The original code made use of setRemainingCooldownTo(1) every frame to constantly keep the weapon on cooldown, which I assumed relates to a weapon's chargedown value... but apparently that only applies to projectile weapons, not beam weapons.
I'd rather not have to use disable() and repair(), as those methods work like weapon malfunctions (and thus render horrible smoke particles & sparks).
Any ideas?