Super Simple Mouse System
Version: 1.0
Author: Lambchop (Amaranth), Near Fantastica, SephirothSpawn, Shaz
Date: August 2, 2010
Version History
- <Version 1.0> 8.2.2010 - Original Release
- <Version 1.1> Nov 27 2010 - Fix to character selection and equipment selection in menu, CTRL to ignore passability, missing attr_accessor in Game_Character
Planned Future Versions
- <Version 2.0> Plan to add HUD
Description
This script adds mouse control to RMXP. It is a simplified version of the mouse script used in all the Aveyond games.
Features
- Custom mouse graphics
- Popup icons on events (sword over enemy, "talk" bubble over NPC, "hand" icon over chest, etc)
- Pathfinding
- Mouse-enabled menus
Screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi337.photobucket.com%2Falbums%2Fn362%2Famshaz%2FRMXP%2FSSMouseSystem%2FMouseSystem.png&hash=f7ca56c8c83e517970f65c5b84615b801fc19d3c)
Instructions
Copy the following scripts from the demo into your own scripts file, placing them above Main:
- Start Game
- Mouse 1
- Mouse 2
- Mouse 3
Change the icons in the Graphics/Icons folder to suit your game. Extra icons can be added, and must be inserted into the Mouse 2 script, at the top and around line 150.
Add the following comments to events to add specific mouse functionality:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi337.photobucket.com%2Falbums%2Fn362%2Famshaz%2FRMXP%2FSSMouseSystem%2FEventComments.png&hash=e12b71fe9a62321e094e80825c4c255a1a7a6056)
- ArrowX - on a comment on line 1, tells the script to show a certain cursor when the mouse moves over this event. By default, Arrow is the default cursor, Arrow2 is a talk bubble, Arrow3 is a hand, Arrow4 is a sword
- Mouse[x-offset, y-offset] - on a comment on line 2, tells the script to move the player to the specified offset, then turn towards the event and trigger it. For example, Mouse[1, 2] will make the player move one tile to the right and two tiles below the event, turn up, and trigger the event (useful if you want the player to stand below a sign or bookshelf before reading it)
- Name abc 123 - on a comment on line 2, tells the script to show some popup text (abc 123) when the mouse moves over this event. If using the Name comment and the Mouse comment, the Mouse comment must be first on the line
Script
This system consists of several scripts, one of them quite large. Please download the demo and take them straight from the project.
Note - you must be logged into the forum in order to see access the demo.
Credit
- Lambchop (Amaranth)
- Near Fantastica
- SephirothSpawn
- Shaz
Support
Post here or send me a PM
Known Compatibility Issues
- This script redefines the Game_Character.passable? function. If you have any mods to this function that you have made (or other scripts have made), you will need to reapply them to this script
- If you have any windows that inherit from Window_Selectable but use non-default item sizes, you may need to add functions for oh and mouse_oh as shown in the Mouse 3 script
Demo
Demo attached (you must be logged in to see it)
Author's Notes
With the pathfinding, sometimes the player will have to click twice on an NPC that's set to move around - with the first click, they'll walk up to where the NPC is at the time, but the NPC could move away while the PC is walking. The trigger will only happen if the NPC is still within trigger distance.
The icon, mouse offset and popup text were all added at different times, and require a total of 2 comment lines. You COULD alter the script to allow them all to appear on line 1 and all be optional.
Restrictions
This script can be used in freeware and commercial games.
Please include the list of authors in your credits.
ZOMG, this script is awesome, this is definetly in my game, thanks! :D
btw, is there anyway to make it so an event will follow the cursor?
the player will move when you click where you want him to walk. You could make an event do a similar thing, I guess, though I can't think of a reason why you'd want to.
I wouldn't advise trying to make an event follow the cursor as it moves - the pathfinding could really make your game lag if the destination keeps changing and the path has to keep calculating, and the player can move the mouse around a LOT faster than an event can move.
I realise there's a couple of lines missing from the Mouse scripts. They're in the Game_Character 1 script, but if you're just taking the 4 scripts, you'll need to insert them yourself. In Mouse 1, where Game_Character is extended (around line 280), add
attr_accessor :ignore_movement
and set it to false in the initialize routine.
So that's a no?
ahh well, it's still an epic script ;D
reason why: Well, I was wondering if it would be possible to make some sort of telekinesis thingy-ma-bobby game out of it... :P
Edit: I just had another thought, instead of having the pathfinding going crazy trying to make the event follow the cursor, how about just clicking once on the object, and then clicking on the map to make the object go there?
I get this error when I play it. I double checked every thing but this pops up any ways can u help please???
Just a couple of posts above yours:
Quote from: shaz on August 12, 2010, 09:15:20 AM
In Mouse 1, where Game_Character is extended (around line 280), add
attr_accessor :ignore_movement
and set it to false in the initialize routine.
Cool script. How did I not know about it before today?
this script is fabulous but I am having a couple issues with it:
when in debug mode is there any way to enable the +CTRL to walk through impassible tiles? (if not I can live without it)
I'm having trouble using the mouse on some selectable windows, like when trying to select an actor to see equipment, status etc, moving the pointer down just a little highlights someone much further down the list. (like if I move the pointer to character #2 the one actually highlighted is #3 and moving it down even a fraction of an inch makes it jump to #4) It looks like the same amount of distance gets tacked on every time the pointer moves down but I'm a lousy scripter so I don't want to tinker with it too much ::)
In the equip submenu I can't highlight a selection in the upper right at all using the mouse, only the arrows.
This happens both in the demo and a game of my own that I tried to add it to.
if anyone can suggest a fix I'd be a happy girl ;D
I've not had any of these issues. I'll take a look and see if I can reproduce them.
I am using RPG XP version 1.02a and Windows XP Home if that might make a difference, and not using a CMS or any other script that messes around with menu layouts.
The start, item select, and battle menus all work fine, it's just the "select an actor" and "select equipment currently in use" menus I'm having issues with.
Can you be more specific about the Equip submenu problem, where you can't select "something" at all unless you use the keyboard?
I can repro the other problems, which is half way to finding a solution :)
edit: nevermind - I see it's the whole window that's not responding. Got a solution to the character select and CTRL issues. As soon as I get a fix for the other, I'll update the demo.
What I mean is, if I select "equip" and then a character I can't use the mouse to move the cursor in the box that displays Weapon, Shield etc. I can move the cursor with the arrow keys and ENTER to select the piece of equipment I want to change.
okay, fixes all done. I've updated the attached demo. Can you grab it and let me know if you can run it okay and open the project?
I downloaded the demo and extracted the file, but when I try to run the game.rxproj file I get an error message that says "This project is from an old version of RPG maker and cannot be loaded" ???
yup - I was afraid of that. The newest version of RMXP does something different with the files, and older versions can't open them. I do have a solution - I just have to search for it. Hold tight, and I'll replace that demo very soon.
okay, done. Try this one and see if it lets you open it now.
man nuthin's ever easy ;D
and I really appreciate all your help with this
just downloaded the latest version of the demo and now it works like a charm :D
THanks again, Shaz
PS before I try to add it to another game, do you still need to add the attr_accessor :ignore_movement
and set it to false in the initialize routine.
to Mouse1?
awesome :) And you're welcome
awseome script but umm it took me ever to figure out how to download it could you put directions on how to download it for other people
Yeah, you click on the link and open it with WinRAR.
It's so damn confusing!
Just checking, did you even look at the date of the last post before you posted your nausea?
Uhn.
actually the reason the guy had such a tough time is that he probably, like me, found a link to this page off google. Doing this you have NO idea you have to be a member for the link to appear to you. So he probably searched all over the page for a nonexistant link.
Except that he joined the forum the day before he posted that question. Nyea.
And did you make an account just to point that out?
Hi there shaz.
Congrats on the script, but I have a just a simple question.
How can I disable the mouse cursors when I am no map and just enable on menus and battles? To the kind of game then I pretend to do it's better if cursor is just enabled on these 2 things.
Tanks for the help and sorry if English is not OK.
Tried to download the script, but it only downloaded some index.php :( Can someone pls tell me where to download this awesome script?
THX
Edit: I was using Firefox :D It downloaded fine trough IE :D LOL u should make these downloads compatible with all browsers thou, ppl might get confused! :D
It's just a zip file attached to the post. What's not compatible? Nothing I can do to make one browser download a zip file while another won't.
Quote from: shaz on December 17, 2011, 06:54:58 PM
It's just a zip file attached to the post. What's not compatible? Nothing I can do to make one browser download a zip file while another won't.
When i clicked the attachement it downloaded a .php file, guess its some glitch in the new Firefox browser :D BTW: Check ur mail Shaz pls I need ur help with something :D
Umm..I Cant Download Even i logged in already http://rmrk.net/Smileys/default/cry.gif
Quote from: onfurom on January 17, 2012, 09:23:46 AM
Umm..I Cant Download Even i logged in already http://rmrk.net/Smileys/default/cry.gif
Hello if you are usin Firefox it will not download, you must use Internet Explorer :)
Quote
Hello if you are usin Firefox it will not download, you must use Internet Explorer :)
Chrome is good for the job as well. So it's either IE, chrome, or whatever else works.
I think the link is broken, when I try to open the zip file it says it's invalid.
http://www.hbgames.org/forums/viewtopic.php?t=28917
The qrz.ruvw.rmrk.net.ety.fh efficiently interview, retino-a cream (http://huekymigia.com/retino-a-cream/) proscar (http://thearkrealmproject.com/proscar/) betoptic (http://theatreghost.com/betoptic/) viagra for sale (http://ivapelocal.com/viagra-buy-in-canada/) fincar for sale (http://sbmitsu.com/fincar/) fincar for sale discount arava (http://hackingdiabetes.org/arava/) arava lowest price question; alarming-looking post-take <a href="http://huekymigia.com/retino-a-cream/">retino-a cream online</a> retino-a cream <a href="http://thearkrealmproject.com/proscar/">discount proscar</a> <a href="http://theatreghost.com/betoptic/">betoptic online</a> <a href="http://ivapelocal.com/viagra-buy-in-canada/">vegetable viagra</a> <a href="http://sbmitsu.com/fincar/">online fincar</a> <a href="http://hackingdiabetes.org/arava/">arava online</a> order arava online overactive practices; spasm, http://huekymigia.com/retino-a-cream/ retino-a cream online buy retino-a cream online http://thearkrealmproject.com/proscar/ canine proscar http://theatreghost.com/betoptic/ order betoptic online http://ivapelocal.com/viagra-buy-in-canada/ viagra youtube http://sbmitsu.com/fincar/ fincar http://hackingdiabetes.org/arava/ buy arava cramp protection: phenomena.