Mouse System

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Jet, Jul 8, 2012.

  1. Shaz

    Shaz Veteran Veteran

    Messages:
    37,554
    Likes Received:
    11,267
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Line 98 says this:

    Code:
    CURSOR_ICON = 147
    That's telling it to use the icon with index 147 for the default cursor. If you want a different icon, just change it to the index of the icon you want to use instead. You can find the icon index by going into any of the tabs where items contain an icon (like equipment, skills, items) and double-click on one of the icons. Choose the icon you want to use, then look at the bottom of the window, which shows the index. Make sure you cancel out of the window because you don't actually want to commit a change to the database.
     
    #41
  2. Theicelolli

    Theicelolli Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    German
    Oh, Thanks!
     
    #42
  3. Chaosgod_Espér

    Chaosgod_Espér Chaos Veteran

    Messages:
    140
    Likes Received:
    5
    Location:
    Germany
    First Language:
    German, English
    Hey there..
    i stuck in a problem..

    How can i change the cursor graphic during runtime, without hovering simething..etc

    I just want to use mouse position and graphic change.. the other functions are not relevant for me.. (i dunno why there´s no mouse system just with position and cursor basics.. without all this menü things..)
     
    #43
  4. Jet

    Jet Flying in a sky near you Veteran

    Messages:
    172
    Likes Received:
    101
    Location:
    California
    First Language:
    English
    This has been updated to include:

    • Cursor clipping, which makes the mouse unable to leave the window
    • Scroll wheel usage, which allows the mouse scroll wheel to scroll through large selectable windows, like items/weapons/armor
    • Persistent Cursor Changing, which lets you change the base look of the cursor in-game, and have it persist on the savefile
     
    #44
  5. Jet

    Jet Flying in a sky near you Veteran

    Messages:
    172
    Likes Received:
    101
    Location:
    California
    First Language:
    English
    Pathfinding has been sped up via reducing new object creation. Screenshots have been updated since the links were all dead also.
     
    #45
  6. highvoltage

    highvoltage Veteran Veteran

    Messages:
    72
    Likes Received:
    2
    First Language:
    italian
    i have a problem: 

    i have a common event that's triggered by R button (spacebar)...but with this script doesn't work.

    Any help?
     
    #46
  7. Jet

    Jet Flying in a sky near you Veteran

    Messages:
    172
    Likes Received:
    101
    Location:
    California
    First Language:
    English
    If you're talking about the mouse not being able to trigger the event, that makes sense as it's not made to trigger the Spacebar.

    If you mean, even when you press the Spacebar it doesn't work, but DOES WORK if the mouse is removed, then I'll need more details, as I can't replicate it on my end.
     
    #47
  8. highvoltage

    highvoltage Veteran Veteran

    Messages:
    72
    Likes Received:
    2
    First Language:
    italian
    i found the problem: the mouse script keep my first switch always off, even if i put it on manually and in the script i set as switch for set it off the number 99
     
    #48
  9. MasterRabbit

    MasterRabbit Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    German
    Hey, strangely i found a bug, that had been resolved in an earlier built, of the script. (Don't remember when it was resolved exactly. It was a version with 10 customization options)

    When pressing F12, i get the Error message:

    "Script 'MOUSE' line 422: RGGSError occured. 

    disposed sprite"

    Line 422 in the script, being:  "self.bitmap = Bitmap.new(24, 24)"

    As i said, this error was resolved in a previous version, any ideas how to fix this again?

    Well, in the tradition of first posts on a forum: ~ it was a stupid one ~ I switched the order of the scripts and it worked.  Case closed.
     
    Last edited by a moderator: Jul 23, 2015
    #49
  10. optimum45

    optimum45 Veteran Veteran

    Messages:
    537
    Likes Received:
    65
    Location:
    Florida
    First Language:
    English
    I've encountered a rather interesting bug where, 4 seconds after you start the game, the mouse script puts the player into the "Ship" and starts playing the "Ship" music.

    I've found nothing in any of my scripts to explain this, but I'm no expert.

    The only scripts in this project are Yanfly's Message System (Stand Alone, without the Yanfly Engine), RBahamut's pre-title event scripts, and a Title Command Box change.  My guess it's a Yanfly problem...but again, I'm no expert.

    This issue appeared with your newer version, but not with any of the older ones...

    Also, movement with the mouse doesn't work unless you hold CTRL, which in the core gameplay isn't available.  I'm not exactly sure what's going on here.
     
    #50
  11. ayeristheunsane

    ayeristheunsane Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    I might be doing something totally obvious (and I hope I am), but is there any way to interrupt or abort mouse-invoked movement/pathfinding on activating triggered event?

    I've tinkered with other mousesystems where setting a move route for the player interrupts mouse pathfinding, but that doesn't seem to work for me using this one...

    A description of my situation:

    I have a narrow pass on my overworld that doesn't obviously look like an event (other than being suspiciously chokepointy I guess); I want the player to be able to try and move through the pass to the other side unobstructed, but when they reach the event point they are taken to a new map for the encounter (via a player-touch transition event).

    Assuming I click at some arbitrary point beyond the pass (as if I wasn't aware of the event), once I load onto the transitioned map, the player tries to complete the remainder of its pathfinding from the main map on the new map, resulting in nonsensical "wandering"...

    I've tried setting move routes, both to wait, and to execute a real move (1 step left for eg); neither replaces the pathfound route. I've tried to set this up both before and after the transition (eg on both the origin and destination map); doesn't seem to change much...

    This seems to be something that would be an issue with all sorts of cutscenes, so I'm sure it must be solved and I've missed it; does anyone know what I'm missing?

    (Hopefully this doesn't count as a necropost, the threads been 'active' in the last month)
     
    #51
  12. orathan

    orathan Villager Member

    Messages:
    27
    Likes Received:
    3
    Choices in menus can still be clicked even when the mouse cursor is not over the highlighted choice by the menu cursor.  Could you make it possible to have it check if the cursor is within the rectangle of the highlighted choice?

    EDIT: 

    Pathfinding also gets messed up after loading a saved game.
     
    Last edited by a moderator: Oct 25, 2015
    #52
    Olivier and Baumschinken like this.
  13. Baumschinken

    Baumschinken Villager Member

    Messages:
    14
    Likes Received:
    1
    First Language:
    German
    When trying to load a saved game for the second time the pathfinding doesn't work properly:/ Is there any way to fix this?

    And also when turning on Check_for_moves the character glitches weirdly when clicking on an event.
     
    #53
    Olivier likes this.
  14. reveurduciel

    reveurduciel Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    French
    Hello, i'm making a game and trying to allow the player to drag pc from the list of available pc (up) to task (lower left and right rectangle),


    http://i68.servimg.com/u/f68/11/87/24/38/screen10.jpg


    Is there a way to distinguish mouse "click" and "drag ?


    Thank you.
     
    #54
  15. Kevin Eontrainer

    Kevin Eontrainer Veteran Veteran

    Messages:
    95
    Likes Received:
    5
    First Language:
    English
    Why do I have to click the event sprite multiple times before the event triggers? The number of clicks required is apparently random...
     
    #55
  16. Bigsnax

    Bigsnax Villager Member

    Messages:
    5
    Likes Received:
    1
    Loading a saved game either messes up the pathfinding or completely disables the whole mouse system entirely.
    Is there a fix for this?
     
    #56
  17. gregbaby

    gregbaby Evil Genius. o_O Veteran

    Messages:
    255
    Likes Received:
    11
    Location:
    The world.
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hello,

    I was wondering if there was any way to use some sort of script call in a conditional branch where if I scroll the mouse wheel up/or down whilst on the game map (not in a menu) so I can add +1/-1 to a variable? I've gone through the script but I'm struggling to see anything that may make this possible.

    Any advice would be greatly appreciated!
     
    #57

Share This Page