I need help to create a new bind to toggle some of the commands! #302
-
I had read about the toggle clear vision discussion, i also understand just a little of coding. For example in public class InputListener : MonoBehaviour { Tab, we have public static event Action? onMiddleButtonPress; . And for (Func, Action)[] InputActions { get; } = [ Tab, we have (() => Mouse.current.middleButton.wasPressedThisFrame, () => InputListener.onMiddleButtonPress?.Invoke()),. But in all those MiddleButtonPress i dont see any code saying "Trigger"? Because M3 is used as Trigger bind right? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 17 replies
-
Think of every key in that file as a global bind. For example, if you change M3 to Backspace. Now every bind in this mod that used to use M3, is now Backspace. I hope that explanation helps. |
Beta Was this translation helpful? Give feedback.
-
Creating a new toggle is much trickier, because you now have to go into the implementation of the mod you want to toggle and create an if-guard that will block the command from running. You can see the ESPMod for an example of how we do that. |
Beta Was this translation helpful? Give feedback.
Here's an example implementation for
WeightMod