Virtual Buttons and DPad

Discussion in 'JS Plugin Releases (RMMV)' started by Aloe Guvner, Apr 18, 2018.

  1. NaJOJO

    NaJOJO Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Jiang
    Primarily Uses:
    RMMV
    What I'm using is the rmmv1.5.1.I don't change the core codes or anythings but I‘m still in trouble.

    And how can I show my custom codes for you?
     
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    Go to the plugin manager and open the plugin parameters from there.
    In the "Key Button Setings" there is a field for each button called "Custom Code".
    Copy and paste the entire code here for me to take a look.

    Umderstand, we have to confirm with the author to see if this plugin work on version 1.5.1. But I think it work ok.
     
  3. HuskyTrooper

    HuskyTrooper Veteran Veteran

    Messages:
    30
    Likes Received:
    24
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Hello @Aloe Guvner
    First of all thank you very much for have developed this very useful plugin. This is what I was looking for.

    I found two issues, and need some help too.
    1. If you click the button that hides the constrols twice, or too quickly, the dpad buttons constantly blinks, I played with the fade values, speed and that, and I found that doesn't happen if you increase the delay to 100 frames, however it makes the moving animation of the dpad image too slow. Also, if you set both values to zero for make the dpad show and hide instantly, it will blink much faster near the other ui button that hides the control. Tried it on a completely clean project and also happens there. Maybe it's caused by MV 1.6.1. How can I fix this? Any code snippet for this issue?
    2. If you hided the ui buttons, and you for example open the map scene, and go back to map scene, the ui buttons are displayed again. Would be good to provide a function that memorizes the state of the UI, so if you hide the buttons, opens the menu, and go back to map, the buttons will be still hidden.
    Also I would like to have more parameter lines to configure different buttons for different scenes, and maybe the option to enable/disable each button by enabling/disabling switches, so different kind of buttons can be used for minigames scenes for example.

    Thank you in advance.
    I wish the best of you.
     
  4. NaJOJO

    NaJOJO Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Jiang
    Primarily Uses:
    RMMV
    Thank you for helping me.

    {"name":"记录","inputMethod":"0","inputTrigger":"k","image":"2121212","hotImage":"1563788801967","activeScenes":"[\"Scene_Map\"]","x":"122","y":"121","soundEffect":"{\"name\":\"确定\",\"volume\":\"90\",\"pitch\":\"100\",\"pan\":\"0\"}","commonEvent":"1","customCode":"\"SceneManager.push(Scene_Item)\"","vibratePattern":"0"}

    The custom code is "SceneManager.push(Scene_Item)".
     
  5. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    Well, I can't see anything wrong from here.
    I only suspect about two things:

    1 - "inputTrigger":"k" - By the default the Rm Mv do not recognize this key. So if you are using a plugin that use the letter "K" from your keyboard, you have to see how can you make this recognizable.

    2 - "commonEvent":"1" - Maybe that is your problem. What's happen in this common event? Can you send a picture of this event?

    Only for eliminate the possibilities, try to use the 1.6.2 version of core mv, just for check if it is related to the version of mv.
     
  6. mrrobot

    mrrobot I make Christian RPG Member

    Messages:
    3
    Likes Received:
    3
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    @Aloe Guvner I am a beginner and I apologize if the question is stupid, what is the procedure for disabling the control along with the hide function? When I use the plugin command "MobileUI disable DPad" the control disappears but it still works even though it's invisible.
     
  7. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    In the case of the DPAD, there is this parameter in the plugin:
    Code:
    * @param disableTouchMovement
    * @text Disable Touch Movement
    * @type boolean
    * @desc Disable touch movement on the map when a DPad is active.
    * @default false
    Put it to false. Then use the plugin command to disable the DPAD.

    As for the other buttons, I think that only the plugin command to disable, will work.
     
  8. wjsrudtn001

    wjsrudtn001 Villager Member

    Messages:
    15
    Likes Received:
    6
    (Sentence is awkward using Google Translator. Please understand.)

    Unlike other D-PAD plugins, this plugin does not disappear even when an event is running.
    I want the buttons to disappear when the event fires.
    How can I do this?
     
  9. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    There is a option in the plugin parameters for the buttons to hide when message window is active.
    But to do this with an event, you can simply put the plugin commands to hide in the beggining of an event and to show in the final.

    But what exactly do you want? Only with events that player can interact? With parallel and autorun events too?
     
  10. wjsrudtn001

    wjsrudtn001 Villager Member

    Messages:
    15
    Likes Received:
    6
    @Eliaquim You can put plugin commands for each event, but since the game is already complete,
    putting plugin commands in every event is inefficient for me.

    What I need is something like Yanfly's Picture Common Events or glav's MV Screen Buttons plugin.
    The pads don't appear when all the "players can't move" events are executed.
    (Messages, choice list, autorun events, etc....)

    Note that the reason why I'm asking to use this plugin smoothly without using other plugins above is that it is related to memory usage.
     
  11. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Well, using the plugin command is may be a long and hard work, but i'ts not inefficient.
    But let us see another options ^^

    hmm... let see if I understand.
    You want to the buttons hide when:
    1 - Window message e choices are active,
    2 - Autorun Events
    3 - And other custom events that you made in your game that the players don't move

    Got it?

    If the option 3 is wrong, maybe I can make a snippet to hide automatically the controls in situations listeed as options 1 and 2.
    But if you want for 3 to, I assume there is no other way than you putting the plugin commands manually.

    I made some edits in this plugin myself, that I can use a switch to turn on and off to hide or show the controls. But this required me to put the command to turn on or off the switch. That's in result, is the same that you use the plugin command, so it don't work for you.
     
  12. wjsrudtn001

    wjsrudtn001 Villager Member

    Messages:
    15
    Likes Received:
    6
    @Eliaquim
    I also know that some custom events require you to work with plug-in parameters manually.

    However, what I need is a set of events designed to prevent players from moving in the RPG MAKER system from the beginning.
    This is different from the event you created by writing a command to prevent the player from moving, such as through a plugin.

    Take Glav's MV Screen Buttons plugin as an example:
    The last line of the plugin is designed to automatically recognize when the screen button should not be displayed using the 'isEventRunning' function provided by mv and to hide the button.

    I have very little JavaScript knowledge, but this plug-in didn't find a script that automatically recognizes situations where D-PAD should not be printed, except for hiding D-PAD when the window_message on line 1286 is called. .

    + In addition, if you hide the D-PAD via the plugin command, the D-PAD will still reappear if you enter and exit the scene where the game scene is refreshed, such as game menus, items, or saves.
     
    Last edited: Aug 20, 2019
  13. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    237
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Sorry, friend. Even if I understand what you say I don't think I can help :/
    Good luck! ^^
     
  14. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I can look into adding it, but no promises on when.

    I guess there could be another plugin command that hides it permanently and remembers the hidden state through some sort of global state (maybe in $gameSystem so that it's also saved to the savefile)
     

Share This Page