Announcement

Collapse
No announcement yet.

Event on button combination

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Event on button combination

    Hi, can I achieve the following in Rewasd?

    When I do a button combination ie: hold L1 and press cross, a function gets toggle on. ie: Turbo L1

    When I do the same combination, the function is toggled off.

    That was the code using a previous solution I had :

    Code:
    int autoRoll = 0;
    
    if(event_press(PS4_CROSS))
    {
        if(get_val(PS4_L1))
        {
            autoRoll = !autoRoll; //the value change (1 or 0)
        }
    }
    
    if(autoRoll == 1) //evaluated every 100ms or so
    {
        if(get_val(PS4_L1))
        {
            combo_run(RapidFireL1);
        }
    }
    
    combo RapidFireL1
    {
        set_val(PS4_L1, 100);
        wait(40);
        set_val(PS4_L1, 0);
        wait(40);
    }
    Thanks

  • #2
    Do I understand this script correctly: [X] pressed together with [LB], results in "autoshot" with 80ms intervals?

    Similar result can be achieved by using [Shifts] and [Rapid Fire] features:
    1. Set [X] as shift modifier for in [Toggle] mode.
    2. Set [Turbo] flag for [LB] with value of 80.
    Every time [X] is pressed, [LB] will toggle between single and auto fire. Remove the [Toggle] flag from [X] on if you want to hold both [X] and [LB] together to autofire.
    Though there is a limitation: [X] must be pressed first in both cases and won't change the fire mode until [LB] is released.

    It is also possible to create a shortcut of [X] and [LB] and remap it to [LB] in [Turbo] mode, but that will work only when two buttons are pressed simultaneously.

    Incoming Shifts Update might present a more smooth solution.

    Comment


    • #3
      Sorry, my naming is confusing now that I look at it, RapidFireL1 should be named RapidPressL1. But yes it's basically what you think it is. The only problem is I cannot use a single button to do a "shift". In most games I need all the buttons I can use on the controller to play normally. In my script, it's only the combination if [X] is pressed while [L1] is maintained that it toggles the Turbo. If I press [X] by itself, it does what the game needs me to press to progress in-game without messing up my gameplay.

      Can I achieve that in Rewasd?

      Thanks

      Comment


      • #4
        Hey there! At the moment, it is not possible to switch to Shift with a combo. To go to a specific layer, you can select only one button.
        We are working on a big update related to the work of Shift mode to improve the application for such cases.

        Based on this, the solution that Shion offered you is optimal.

        There is another option to use activators, but I'm not sure if this option will suit you.

        You can map L1 with turbo to Double/Triple or Long Press of any button on your controller (e.g. Double Press L1).

        Thus, pressing L1 once will trigger a simple mapping to L1, and if you press L1 twice and hold it, L1 will turn on with turbo until you release the button.

        Comment

        Working...
        X