Closed Spudgun closed 2 years ago
From my testing IsDisabledControlPressed also return valid data even if the control is not disabled, it seems to me that IsControlKeyJustPressed is redundant from just using the Disable native.
Hmm, @Spudgun can you check if what Ekinoxx said is accurate, and if so, update the PR?
Also, the difference between "ControlPressed" and "ControlJustPressed" in the resource is intentional. In some cases, things should only work on press and others (like modifiers) should support pressing and holding. Combining those two is fundamentally changing how the controls work and I don't think that's good. If you had a particular reason for doing this, please detail that reason so I can better understand.
Hmm, @Spudgun can you check if what Ekinoxx said is accurate, and if so, update the PR?
Also, the difference between "ControlPressed" and "ControlJustPressed" in the resource is intentional. In some cases, things should only work on press and others (like modifiers) should support pressing and holding. Combining those two is fundamentally changing how the controls work and I don't think that's good. If you had a particular reason for doing this, please detail that reason so I can better understand.
So I've just had a play around with the control enabling/disabling. I can confirm that what @Ekinoxx0 said is correct. If a control key is enabled or disabled right before the check that of IsDisabledControlPressed
or IsControlPressed
etc it will then trigger even if the control is being disabled/enabled in another script.
This is then making my implementation of IsControlKeyJustPressed
function redundant.
In saying all of the above, I have updated my PR to ensure that functionality is still possible in the circumstances another script is disabling/enabling the control key we're testing for. I have also reverted the JustPressed
and Press
changes as I didn't think through the intended use case scenario for those. It's quite fundamental to how the script works, as you said 🙂
All good, mate!
Happy to help contribute to such a useful tool!
Enables key binds for poly manipulation regardless if a key is enabled or disabled.
A lot of no-clips disable input of all types, making the IsControlJustPressed not trigger. Essentially just makes this script compatible with a lot of other scripts that disable input of certain types.