Amaranth's Super Simple Mouse System for Ace

The system cursor is hidden while the mouse is over the game window. If you hit F1 WHILE the system cursor is hidden, it won't reappear, and you can't use the mouse to change your game options in the F1 window.


You can avoid it by moving the mouse OUT of the game window (without clicking outside) before hitting F1. But the ideal solution would be to detect the coming change in window focus BEFORE it happens, and make the system cursor reappear before the focus is lost.
Oh, I see it. I was looking at the wrong cursor lol
Hello everyone, It's my first post ^^

Thank you so much for this amazing script.
I need to do something with it, and I don't know how to do it.

I want the text of the Objects/People/etc.. on the TOP , not in the Right/Left side.

Look my photo and you will know what I'm saying.

[IMG]http://s14.postimg.org/hilyn7pcx/image.jpg[/IMG]

Its possible to do? It will be fantastic.

Thank you so much!
 
Hi sertians, and welcome 🙂


I'll see if I can get you a fix to do this within the next couple of hours.


Edit: this is proving a little more difficult than I anticipated (ie - it's not the 2-3 line change I thought). I'll still work on it for you, but I'll have to wait until I have some more spare time.
Hi everyone,

It's my first post too... This post must be a magnet for us...

First of all, this is an amazing script. It really adds something to a game being able to use mouse to control it 🙂

But I do have a slight issue. I have an event that autoruns when the player first enters one of my maps, it starts by moving the player to a position (looking out a window). Then an NPC is moved on screen to stand to them and also look out the window. Then some dialogue is initiated...

The problem I'm having is that whilst the NPC is moving, the player can move around freely using the mouse controls (keyboard controls remain disabled during this part)... Then when the dialogue happens they might be on the other side of the map. Is there anything I can do to prevent the player moving with the mouse during this part, or if not anything you can do to fix this in the script?

Thanks in advance.
Oh - so you can't use the keyboard, but you can use the mouse? I'll take a look.
Same thing even if something is set on wait the keyboard disable but the mouse can be used to make the character walk.
This mouse script is great, fixes all the problems I've had with other mouse scripts =)

I just have one (hopefully small) request. I was using a HUD with buttons you could press.

Screenshot of HUD

Is there a way to use a comment code to see if the click happens at a certain x, y on screen and do no movement but open a scene, run a common event, etc?
I also have a hud integrated with the mouse system in my game.


I'll see if I can pull it out and give you the code. You shouldn't find it too difficult to modify for your own use.
awesome =) thanks!
Alright - so you need to know the height of your hud. I'll use a constant called HUD_HEIGHT - you can do the same and set it to the appropriate value, or just use 24 or 32 or whatever the height is.

In the Player section of the mouse script (class Game_Player, if you're using the all-in-one script), find these lines:

if !$game_message.busy? && !$game_message.visible && !@move_route_forcing && !@vehicle_getting_on && !@vehicle_getting_off && Mouse.trigger?(0) && !Mouse.grid.nil?and add one more condition at the end:
Code:
      if !$game_message.busy? && !$game_message.visible && !@move_route_forcing &&        !@vehicle_getting_on && !@vehicle_getting_off &&        Mouse.trigger?(0) && !Mouse.grid.nil? && Mouse.pos[1] > HUD_HEIGHT
This tells the mouse to NOT move the player to the mouse point when you click over the hud area.Then, in the Map section of the script (class Scene_Map), find these lines:

Code:
  def update    $mouse.update_event_cursors    shaz_mouse_scene_map_update  end
and add in a new method call:
Code:
  def update    $mouse.update_event_cursors    update_hud    shaz_mouse_scene_map_update  end
and add the new method:
Spoiler
Code:
def update_hud  mx, my = Mouse.pos  # if mouse is clicked over the hud  if my <= HUD_HEIGHT && Mouse.trigger?(0)    # set the menu actor as the leader for any 'personal' commands (equip, skills, etc)    $game_party.menu_actor = $game_party.members[0]    # determine what icon was clicked on    # Menu    if mx.between?(menu_icon_x1, menu_icon_x2) # replace menu_icon_x1 and menu_icon_x2 with the left & right x positions of the menu icon      SceneManager.call(Scene_Menu)      Window_MenuCommand::init_command_position    end    # Items    if mx.between?(items_icon_x1, items_icon_x2)      SceneManager.call(Scene_Item)    end    # Skills    if mx.between?(skill_icon_x1, skill_icon_x2)      SceneManager.call(Scene_Skills)    end    # Equip    if mx.between?(equip_icon_x1, equip_icon_x2)      SceneManager.call(Scene_Equip)    end    # and so on for the rest of your icons  endend
Works great =)

thanks again
Having multiple issues with the script.  Sometimes keyboard input will start failing, sometimes events won't trigger immediately, sometimes it'll fail to summon the menu with RMB.

I can (sometimes!) regain input by interacting with an event/entering a new room.  Same goes for when RMB fails.

On 'not triggering immediately': There's a large delay when I'm interacting with an object that requires no movement to reach; about 3-4 seconds worth.  (e.g. I'm adjacent to an event with the 'on player interact' interaction type and click on it and it may take up to 4 seconds for the interaction to go through)
What other scripts are you using?
Mithran's Text Cache Bugfix

Neonblack's CP Gradient Text

Moghunter's Weather EX

Khas' Awesome Light Effects

Acezon's Map as Title Screen

modern algebra's ATS system (Options, Formatting, Message Codes)

modern algebra's Animated Parallax

Victor Saint's Engine

VE Step Sound

VE Fog and Overlay

a map parallaxing script

mikb89's Ambient Sound

Galv's Region Effects

Zeus81's Map Effects

Majirefy's MapName Plus

VM of DT's Basic Options Menu

Tsukihime's Gameover Events

Word Wrapping Message Boxes by KilloZapit

Auto Formatting by Jet10985

And one custom script:

Override text writing speed
Can you try creating a NEW project, JUST add the mouse script, and see if you have the same issues?
I do not encounter the same issues with just the mouse script in a fresh project.  Or, at least, just duping one of the maps and running around in it doesn't seem to cause problems.  Haven't tested at length.

Edit: I think it has something to do with Khas' Awesome Light Effects.  When I try to pick up this lantern suddenly the mouse system is unable to get my target.  I'll move up to the target, but it won't reliably activate.

(I'm hypothesizing this because I slowly added scripts from the other project into the new project.)


That said, I should make sure it's not the event itself.  One moment.
I'm wondering if it's a script incompatibility. Is the mouse script above or below the others in your game? Try putting it right at the bottom of your other custom scripts.
Already at the bottom, I'm afraid, in both projects.  I figured the same.

Was able to narrow the list down to the following potential culprits:

Text cache bugfix, gradient text, weather EX, Khas' light effects, auto-formatting, custom font bug fixes, msg override speed, and wrap msg.

Going to remove them all and try to pick up the event without any other script but the mouse script.

Edit: It is in fact the event itself.  Running no other scripts but the mouse system, the following event is uninteractable.  Does this replicate on your end?  (It should be throwing an error at me for calling methods that don't exist as I removed KALE.  However, it doesn't.)

https://dl.dropboxusercontent.com/u/80991744/TRON/event_position.PNG

https://dl.dropboxusercontent.com/u/80991744/TRON/evt_pg1.PNG

https://dl.dropboxusercontent.com/u/80991744/TRON/evt_pg2.PNG

https://dl.dropboxusercontent.com/u/80991744/TRON/evt_pg3.PNG

Edit2: In fact, it has nothing to do with the event's contents either.  More perplexing, placing the same event in a new map allows it to function.  There's something about that particular arrangement of events that's causing this?  Most confusing of all is that it pathfinds right up to the event, faces it, and then does nothing.
Yep.  A click in Chrome (or anywhere outside of the game window) while the game is running will not register with the script as a click.  This is not something built into the script - it is the default behaviour of the engine (clicking outside the game window removes the focus from the game and halts script processing).  Are you asking because you've tried it and had different results?
Oh I meant, just have Chrome/Photoshop (100% guaranteed with photoshop) open and running in the background while playing the game. It tends to make Mouse Systems not work in RM for me.

Original thread: https://forums.rpgmakerweb.com/threads/amaranths-super-simple-mouse-system-for-ace.17829/