Skip to content

I need help to create a new bind to toggle some of the commands! #302

Answered by winstxnhdw
Dexteriority asked this question in Q&A
Discussion options

You must be logged in to vote

Here's an example implementation for WeightMod

using System.Collections;
using GameNetcodeStuff;
using UnityEngine;
using Hax;

public sealed class WeightMod : MonoBehaviour
{
    bool EnableWeightMod { get; set; } = false;

    void OnEnable()
    {
        InputListener.onMiddleButtonPress += this.ToggleWeight;
    }

    void OnDisable()
    {
        InputListener.onMiddleButtonPress -= this.ToggleWeight;
    }

    void ToggleWeight() => this.EnableWeightMod = !this.EnableWeightMod;

    IEnumerator SetWeight(object[] args)
    {
        WaitForEndOfFrame waitForEndOfFrame = new();
        WaitForSeconds waitForOneSecond = new(1.0f);

        while (true)
        {
            if (!this

Replies: 2 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
17 replies
@Dexteriority
Comment options

@winstxnhdw
Comment options

@Dexteriority
Comment options

@winstxnhdw
Comment options

Answer selected by Dexteriority
@Dexteriority
Comment options

@Dexteriority
Comment options

@winstxnhdw
Comment options

@Dexteriority
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants