Virtual Buttons and DPad

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

  1. Jenova

    Jenova Because you are...a puppet! Veteran

    Messages:
    162
    Likes Received:
    110
    Location:
    Hawaii
    First Language:
    English
    Primarily Uses:
    RMMV
    I didnt even realize this had updated beyond what I had initially reported. Lol, i got no alerts about it either. Oh well. Updated. :)
     
  2. Kest

    Kest The Ecstasy of Gold Veteran

    Messages:
    147
    Likes Received:
    24
    First Language:
    English
    How do you get this to read the keyboard? I made a button that clicking it opened the item scene directly, but when I tried adding an 'I' keypress nothing happened?
     
  3. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Not possible automatically, but you can use plugin commands to hide or show the button on each different map. It could be a Feature Request. Probably it could be implemented with a new plugin parameter inside each button configuration to hold a list of Map IDs. For backwards compatibility, it would have to be Map IDs to hide the button (not show).

    Not possible currently actually, it could be a Feature Request.

    This plugin doesn't read from the keyboard, it create virtual buttons that are used with touch or mouse. Unless I'm misunderstanding your question? It would help if you shared the configuration you've done.
     
  4. Kest

    Kest The Ecstasy of Gold Veteran

    Messages:
    147
    Likes Received:
    24
    First Language:
    English
    I may have misunderstood what "input code" meant, i tried making a visual button that you could both click and keypress:

    item.PNG
     
  5. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I see, you have the custom code which opens the item scene when the button is pressed.

    It would also simulate the keyboard key "i" as pressed. However, by itself, that doesn't do anything unless some event or plugin is listening for the keyboard key "i". Do you have something that responds to the key "i"?
     
  6. Kest

    Kest The Ecstasy of Gold Veteran

    Messages:
    147
    Likes Received:
    24
    First Language:
    English
    no, i thought "input code" was the other way around, that pressing "i" would activate the button in addition to clicking it.
     
  7. Black Mamba

    Black Mamba Veteran Veteran

    Messages:
    254
    Likes Received:
    74
    First Language:
    pt-br
    I got this error this.containsPoint is not a function



    Screenshot_1.png
     
  8. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    When does it happen?
    • When the game first loads?
    • When a map loads?
    • When the Dpad is pressed?
    Does it happen on a project with no other plugins?

    What's the configuration for the Dpad?
     
  9. Black Mamba

    Black Mamba Veteran Veteran

    Messages:
    254
    Likes Received:
    74
    First Language:
    pt-br
    its happens in title screen, when i press any button.
    Dpad i just add the button picture
     
  10. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    239
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Maybe it is related to the version of the rpg core.js? Do you are using the latest? Because here all works on the title screen.
     
  11. Kest

    Kest The Ecstasy of Gold Veteran

    Messages:
    147
    Likes Received:
    24
    First Language:
    English
    How would I "push" a common event like a scene? For example I have a button with the custom code "SceneManager.push(Scene_Item)" and this will let you open the item screen even in the middle of a message.

    I tried making a button for a common event, but it waits for the current message to end before playing - how do I get it to interrupt the current message?
     
  12. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    The common event feature added in the most recent version uses the "reserveCommonEvent" function which basically puts the common event into a queue, so it gets executed whenever the event interpreter is free.

    I'm not sure how to forcibly stop an event to run another one, I think you'd have to somehow insert the common event commands into the currently running interpreter. The good news is that's more of a general MV Javascript question, you may be able to get an answer posting on the Javascript Support boards.
     
  13. jjleroy

    jjleroy I love bananas Veteran

    Messages:
    184
    Likes Received:
    33
    Location:
    Austria
    First Language:
    German, English
    Primarily Uses:
    RMMV
    That's an amazing plugin and sounds exactly like what I'm searching for. Thank you so much for your work.
     
    Last edited: Jul 17, 2019
  14. Jufry_A

    Jufry_A Villager Member

    Messages:
    5
    Likes Received:
    2
    Location:
    Jakarta
    First Language:
    Indonesia
    Primarily Uses:
    RMMV
    Meet random encounter while DPad is Pressed will make button pressed forever and cant to be stopped.
    is this a bug?

    Solved:
    I added
    Code:
    ALOE.clearDpadInput();
    to Scene_Battle start function
     
    Last edited: Jul 17, 2019
    HuskyTrooper and Kest like this.
  15. NaJOJO

    NaJOJO Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Jiang
    Primarily Uses:
    RMMV
    Excuse me.I don't know how to deal with it.

    upload_2019-7-26_14-3-0.png
    upload_2019-7-26_14-3-14.png
     
  16. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,260
    Likes Received:
    3,572
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @NaJOJO I highly recommend getting (and showing us) the stack trace from the Console (like in this post). It will help people track down the bug in the plugin, if there really is one, or will narrow down where you may have made an error if there is no bug. You may need to be in Playtest Mode and you may need to press F8 to access that window with the Console.
     
  17. NaJOJO

    NaJOJO Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Jiang
    Primarily Uses:
    RMMV
    OK.I've already done it.

    upload_2019-7-26_14-17-26.png
     
  18. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    239
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    Here I'm seeing two things:

    1 - The input code is empty. I'm not sure if it can be empty, even of you put a custom code.

    2 - I see that you use a japanese version, so maybe I'm wrong about that. But in the custom code parameter you put
    "SceneManager.pushu"
    I think the correct is "push".
     
  19. NaJOJO

    NaJOJO Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Jiang
    Primarily Uses:
    RMMV
    Thank you.I've dealt with these things you said.But the problem has not been solved yet.
     
  20. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    676
    Likes Received:
    239
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Sorry to hear that!
    I don't think this is a plugin conflict.
    What is the version of Rpg Maker Mv that you are using? Here I'm using the latest 1.6.2, without any plugins, I don't have any problems.
    Did you change anything in the core codes of Rm Mv?

    Also can you show all your custom code for me to take a look?
     

Share This Page