Mouse System Ex

Discussion in 'JS Plugin Releases (RMMV)' started by Galenmereth, Oct 24, 2015.

    Tags:
  1. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,914
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    @Makeratore: Animated cursors are currently not supported. While technically possible to implement I haven't yet tested how performant (or not) it is; it might not be feasible with the native cursor movement. If it isn't, an alternative is to use a sprite as the mouse cursor, but this introduces a minor but noticeable input lag which I personally don't think would be worth it. But I'll test and see how it goes sometime in the near future.
     
    #61
    Makeratore likes this.
  2. Makeratore

    Makeratore Veteran Veteran

    Messages:
    187
    Likes Received:
    51
    Location:
    Rome, Italy
    First Language:
    Italian
    Thanks for trying that!
     
    #62
  3. LordSquirrel

    LordSquirrel Veteran Veteran

    Messages:
    107
    Likes Received:
    22
    First Language:
    English
    Is there a way to change the cursor mid-game? Like a plugin command?
     
    #63
  4. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,914
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    #64
    Bonkers likes this.
  5. LordSquirrel

    LordSquirrel Veteran Veteran

    Messages:
    107
    Likes Received:
    22
    First Language:
    English
    Ah! Thanks, Mereth!
     
    #65
  6. Marillmau5

    Marillmau5 Veteran Veteran

    Messages:
    79
    Likes Received:
    9
    First Language:
    English
    Definitely using this, thanks! Looking forward to seeing your other plugins.

    Can you make it so after an item is hovered you can click anywhere to select the item as long as your not hovering over anything else.

    For example if i hover to items it hovers over it which is great but after hovering i have to pysically click over items, i want it so when its hovered over already and i click the mouse in a blank area it still selects the items. This is because its easier to go faster and in battle when the enemy is already selected i want to just click to attack not physically click over him or over his name to attack. Hope thats an easy addition!
     
    #66
  7. Benji-Ninja

    Benji-Ninja Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Hey Galenmereth, 

    I am having some trouble calling plugin commands. 

    When I use the command "SetCustomCursor filename.png" (but obviously with an actual assigned image filename) the game crashes and brings up an error message:

    "Error - Uncaught TypeError: Undefined is not a function".

    This happens if I am using a custom image (that I can set to the auto custom cursor, so it works usually) or if I try to change the cursor to one of your predefined images. I've tried poking around online and following your guide but the guide isn't that clear on the context of using the Plugin Command. Does it have to go in a specific place in an event? Am I placing it wrong? 

    I'd really appreciate the help because it's a great script.
     
    #67
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,411
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    What happens if you leave out the .png part?
     
    #68
  9. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,914
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    @Benji-Ninja: There was actually a bug in the latest version so which caused this to happen. If you update to the new version here, it should work fine :)
     

    Version updated to 1.8.2
    Changes:

    • Fixed a bug with the SetCustomCursor plugin command.
    The latest version can be downloaded here from the standard link. And as always, head on over to the documentation page for the full changelog and up-to-date documentation.
     
    #69
    astracat111, Bonkers and Benji-Ninja like this.
  10. Benji-Ninja

    Benji-Ninja Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    @Galenmereth

    Thanks Man! I was going crazy trying to work out what I did wrong! But apparently wasn't on my end! Thanks for fixing it up! It's a great system. I am planning to use it to have a flying travelling companion turn into a cursor at certain moments of the game and reach where the protagonists cannot. 
     
    #70
  11. Bonkers

    Bonkers Bioware, do you need a nap? Restaff

    Messages:
    2,948
    Likes Received:
    2,890
    Location:
    New York
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you for the recent update.  I am so happy we can change the custom cursor with a plug in command in game.
     
    #71
    Galenmereth likes this.
  12. estriole

    estriole Veteran Veteran

    Messages:
    1,030
    Likes Received:
    334
    First Language:
    indonesian
    after updating this plugin to newest version... 1.8.2

    click_activate!

    somehow broken...

    no error... it just... i cannot click event from far away...

    the player walk to the event instead...

    edit: apparently it's incompatibility with my plugin... i guess there's some changes in this update that caused my earlier patch cannot work :D .

    i will revise my compatibility patch to reflect your changes... sorry for disturbing you... best regard, Estriole.
     
    Last edited by a moderator: Dec 27, 2015
    #72
    Galenmereth likes this.
  13. Kongorg

    Kongorg Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    Great plugin! Is there any way to read the cursor's x/y values? I want to have an event on a certain map that checks if the cursor is near the edge of the screen and pans the map in that direction. Is there currently a way to do this with this plugin?
     
    #73
  14. astracat111

    astracat111 Astra Cat Veteran

    Messages:
    205
    Likes Received:
    111
    Location:
    New York City
    First Language:
    English
    Just what I was looking for, thank you very much! : D

    edit: okay, ive found a bug. in my first game i tried it on, i cant get it to work because its searching in the wrong path.

    my priject folder exists as Project14/img/cursors   and its looking in just simply img/cursors in my game folder.

    so i try putting into the custom cursor dirctory:

    Project14/img/cursors   and then it searches in Project14/Project14/cursors.

    i turned all of my other plugins off. So its some problem its having with directories...

    i created another game named Project15 and put the plugin in this project. it first creates the directory the first time i start it, and the plugin worked fine.

    i have no clue why this is, ill look into the code more to try to find a solution....

    EDIT: on line 322 for the project i ended up just having to add the directory myself like this:

    Code:
    var cursorPath = 'Project14/img/cursors/' +  cursor;
     
    Last edited by a moderator: Jan 9, 2016
    #74
  15. brandos

    brandos Veteran Veteran

    Messages:
    147
    Likes Received:
    31
    First Language:
    German
    For sprite that include two tiles the cursor only changes on the bottom part of the sprite. is there a way to fix that?
     
    #75
    ZcheK likes this.
  16. gRaViJa

    gRaViJa Veteran Veteran

    Messages:
    733
    Likes Received:
    266
    Location:
    Belgium
    First Language:
    Dutch
    Now that I stumble on this plugin again:


    When I have a custom mouse icon and i the icon goes outside the game screen, it is replaced again with the default cursor icon. I have to right click in the game to get the custom mouse icon again. Other people have this problem as well? Galenmereth, would you look into this?
     
    #76
  17. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,914
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    Can't believe I've overlooked that case. I've taken note, will get it fixed in a future patch soon.

    This is a known bug indeed. The problem is that it has to do with the webkit wrapper the game runs in, and how it works on Windows; you won't have this problem on, say, OSX (Mac) or in a browser on either OS. The issue is that the "chrome" on Windows (ie. the border surrounding the game window when run in window mode) doesn't fire off mouse events properly, and what practically ends up happening is that the game's code and my plugin won't be told if the mouse left and re-entered the window. I have yet to figure out a way to solve this, because the only "solution" I've found so far is to constantly change the cursor back and forth every frame, which is not good for performance at all. It might be possible if the webkit wrapper MV outputs gets updated, or I find some better hacky solution to fix it. Or we might have to start wrapping our games in a custom webkit wrapper to alleviate this and some other more serious issues. Regardless, you can rest assured I'm aware of it as it bothers me on a daily basis while working on my own game :)  
     
    #77
    ZcheK and gRaViJa like this.
  18. gRaViJa

    gRaViJa Veteran Veteran

    Messages:
    733
    Likes Received:
    266
    Location:
    Belgium
    First Language:
    Dutch


    Okay, thank you for the update. I hope with you there's a good and easy solution for this out there :)
     
    #78
  19. ZcheK

    ZcheK ZcheK Veteran

    Messages:
    96
    Likes Received:
    22
    First Language:
    English


    I also have the problem with using large sprites for my events, I can only target my event's feet :) Also thanks for the great plugin
     
    #79
  20. lawina

    lawina Veteran Veteran

    Messages:
    147
    Likes Received:
    28
    First Language:
    English
    Is it possible to show a different mouse icon when hovering over a (show choices...) menu item?
     
    Last edited by a moderator: Mar 22, 2016
    #80

Share This Page