Yanfly Button Common Events bind to Gamepad?

Discussion in 'Javascript/Plugin Support' started by Nectar, Sep 20, 2019.

  1. Nectar

    Nectar Fried Ore0s Veteran

    Messages:
    110
    Likes Received:
    16
    First Language:
    English
    Primarily Uses:
    RMMV
    So I was excited to playtest my entire game and see how it goes. I hooked up my gamepad only to realize I couldn't assign the Common Event Keyboard bind "E" to anything on my gamepad. I have all of Yanflys keyboard related plugins as well as the gamepad plugin.... I'm confused as to how I should approach this... I want to bind "E" to my controller so it runs the common event menu.
     
    #1
  2. Nectar

    Nectar Fried Ore0s Veteran

    Messages:
    110
    Likes Received:
    16
    First Language:
    English
    Primarily Uses:
    RMMV
    Bump
     
    #2
  3. ImaginaryVillain

    ImaginaryVillain Villain in Event Wonderland Veteran

    Messages:
    175
    Likes Received:
    187
    First Language:
    Event Gibberish
    Primarily Uses:
    RMMV
    Under Conditional Branch on the 4th tab is the option to select "if button is pressed" along with which one. Just setup a parallel event with a conditional branch that runs your common event when the right button is pressed. You can bind everything on the controller except the status button which I'm still at a loss on myself.

    As a warning, this method doesn't disable the original functionality of the button in question. So you will need to either use the shoulder buttons, or a plugin to disable dashing. As for the other buttons, Ok and Cancel work but you'll have to design your game in such a way that hitting Ok/cancel over and over doesn't mess stuff up.
     
    #3
    Nectar likes this.
  4. Nectar

    Nectar Fried Ore0s Veteran

    Messages:
    110
    Likes Received:
    16
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry but what are those button press lines? Like what button would my right R1 shoulder button be?
     
    #4
  5. ImaginaryVillain

    ImaginaryVillain Villain in Event Wonderland Veteran

    Messages:
    175
    Likes Received:
    187
    First Language:
    Event Gibberish
    Primarily Uses:
    RMMV
    The buttons are....
    Page UP = Left Shoulder Button
    Page Down = Right Shoulder Button
    Shift = X Button
    Ok = A Button
    Cancel = B Button

    There are also options to manipulate the directions as well, but those are pretty self explanatory.
     
    #5
  6. Nectar

    Nectar Fried Ore0s Veteran

    Messages:
    110
    Likes Received:
    16
    First Language:
    English
    Primarily Uses:
    RMMV
    Cool, but it's a parallel event, is there a way to not make it run every second? Is there a way to allow it to pause? Or will this parallel not really affect the game? I have about 5 parallel events in every map (including this one) but I don't plan on adding anymore.

    Is this a dangerous amount?
     
    #6
  7. ImaginaryVillain

    ImaginaryVillain Villain in Event Wonderland Veteran

    Messages:
    175
    Likes Received:
    187
    First Language:
    Event Gibberish
    Primarily Uses:
    RMMV
    You could set the event "Frequency" to a lower amount and it would run less often. Since it only does something if a button is triggered though, I run my own personal one at "Highest" because I don't want the player to experience input lag. But if that's not pressing, like you're not making an action RPG, then it shouldn't matter a huge amount to set it lower. Experiment and see what works best.

    As for an event pause, just set the event page with a switch "Controller On" under "Conditions", then when you turn that switch off the event won't do anything.

    In the case of too many parallel events, it's not really the number of events that matters so much as what they do. I've made singular parallel events that can cause lag (yay scripting errors). But I've also constructed a dungeon randomizer with an event based ABS using parallel events, and no lag. Just the question of what you're using them for that decides the amount of lag. My best advice is run them at the lowest frequency unless you have a reason to run them at a higher one. Also only turn them on when you need them, and turn them off when you don't.
     
    #7
    Nectar likes this.
  8. Nectar

    Nectar Fried Ore0s Veteran

    Messages:
    110
    Likes Received:
    16
    First Language:
    English
    Primarily Uses:
    RMMV
    Holy moly, I didn't know frequency affected them as well. Thank you so much! Well all my questions have been answered, thanks again.
     
    #8
  9. ImaginaryVillain

    ImaginaryVillain Villain in Event Wonderland Veteran

    Messages:
    175
    Likes Received:
    187
    First Language:
    Event Gibberish
    Primarily Uses:
    RMMV
    Sure thing, glad I could help!
     
    #9

Share This Page