Jump to content
Vlue

Basic Mouse System + Addons

Recommended Posts

Hi again Vule - sorry to bother you, I'm the same person who had trouble with the climate script a few days ago. I was just wondering about compatibility. I'm using a custom save scene as well as the mouse, but when I try to load or save or save the game, it crashes. The error says "Script 'scene_File' line 89. NoMethodError occurred. undefined method 'rect' for nil:NilClass. If there's no easy way to fix this, don't worry about it because it's not that big of a deal (I can take out the save script) and I feel like I've bugged you enough for one life time  :lol: .

Thanks!

Share this post


Link to post
Share on other sites

Go to line 198 in my script which should be 

class Scene_File < Scene_MenuBase

and change it too

class Scene_File23 < Scene_MenuBase

and see what happens.

Share this post


Link to post
Share on other sites

No! But I did update it so you can enable/disable it with a script call if you wanted, since you asked~

Mouse.enable and Mouse.disable will enable/disable the mouse as needed.

Share this post


Link to post
Share on other sites

I have installed the mouse system, but no mouse curser appears in the game.

I don't know if I did something wrong or the script was misunderstood.

With the script I should be able to play and control with the mouse?

Can you please help me?

PS:
Excuse my bad english, but I usually speak German.

 

 

 

I found it myself. I'm sorry for my stupid question.

 

But I have another question.
There is the possibility that events are also clickable? (As a point & click game)?

Edited by kruemel

Share this post


Link to post
Share on other sites

No such thing as a stupid question! Most of the time...

As it stands right now, you can only click on and activate events if you are beside them.

Share this post


Link to post
Share on other sites

I seem to be having the same problems devilarms2099 did. Yanfly's system options requires a switch to turn the mouse feature on and off unfortunately, not the simple event commands :/. Is it possible to make it so when the switch is on mouse.enable is active and when it's off mouse.disable is active instead?

Thanks 

Share this post


Link to post
Share on other sites

Thanks! Unfortunately, I can't seem to get it to work correctly. When the switch is set to false, everything works fine. However, when the switch is set to true and is put on, the mouse does not work. For example, my switch for the mouse is 136. Because the switch is not on in the beginning, there is no mouse which makes sense. When I create an event that turns switch 136 on though, the mouse remains off. The script command Mouse.enable doesn't seem to be working as well. Any idea to why this is? I also tried it with a blank project to check for script compatibility, but the same problems occurred. 

Thanks again! 

Share this post


Link to post
Share on other sites

Hey Vlue, just wanted to say great work on this script man. I like how open it is to customization. Feels like now I have a core mouse engine that I can take and customize and tweak to fit the setting of my games. Thanks. :)

 

Suggestion: I recommend people combine the use of this mouse script with another script that unlocks full keyboard input support. Then the player can have WASD for moving for example. I was thinking though, maybe you could find one of these scripts and get the authors permission to include its methods within your mouse script? Then you'd have a mouse core engine that is open ended and comes with full keyboard input support. Which would make this a very tasty thing indeed.

Share this post


Link to post
Share on other sites

Amazing script here Vlue! I'm using it in one of my current projects, Shallows Island! :) Keep up the great work!

 

@Gump: I am using a full keyboard input script that supports wasd movement, and works perfectly with this script. I can't remember exactly which one it is right now... And I'm at work currently. But when I get home I'll be sure to post a link to the one that works. (I had to look through a few of them because they either didn't work with this mouse script, or they just didn't work at all. Lol!)

Edited by KevinFrost

Share this post


Link to post
Share on other sites

Hi, I've just used your script in a game I'm working on. I'd like to know if there's a simple way to disable it affecting the characters movement. I'd like to use it only for menus.

 

I've commented out lines 257 - 303, where 

  1. class Game_Player < Game_Character

begins, which seems to have done the trick but it also got rid of the ability to use the side bar icons which I'd really like to keep. I'm not very clued up on scripting so I'm not sure which parts of coding I should keep and which ones I can erase (so close!) It's a really great script but if you don't mind me editing out that part for my game could you help out, please?  :)

 

Thank you

Share this post


Link to post
Share on other sites

Hey, thanks for your great work.

 

I'm new to scripting, so I have a basic question (sorry for that)

 

I'm trying to asign mouse function to ingame variables, so I did the following:

a = Mouse.pos?
$game_variables[1] = a[0]
$game_variables[2] = a[1]

in that way mouse coordinate X is stored on variable 1 and mouse coordinate Y is stored in variable 2.

 

Now I want to save left and right clicking to a switch to know if right or left click is being pressed or not. ¿how do I do that? seems to have something to do with Mouse.lclick?, but I can't seem to make it work.

 

 

thanks for your help

 

 

 

----EDIT:

 

Ok so I was able to do something similar, but I don't know if its the most efficient way

lclickok = Mouse.lclick?()

if lclickok == true
  $game_switches[2] = true unless $game_switches[2] == true

elsif lclickok == false
  

elsif lclickok == nil
  $game_switches[2] = false unless $game_switches[2] == false

     
 
end
Edited by Krazlegan

Share this post


Link to post
Share on other sites

If it works, it works! There's 18 million ways to do something.

Mine would've been:

 

$game_switches[2] = Mouse.lclick?
$game_switches[2] = false if $game_switches[2] == nil

Which is essentially the same as yours. (Just untested and possibly explosive)

Edited by Vlue

Share this post


Link to post
Share on other sites

Yeah that works like charm! thanks

 

I noticed something weird though.

 

I set a parallel process with:

Conditional branch: Script: Mouse.lclick?
    Play X Sound Effect

Conditional branch: Script: Mouse.rclick?
    Play X Sound Effect

If I rapidly click left click the sound is played 100% of the times. But if I do that with right click it will play the sound only about 60-70% of the times, making the right click "sensor" rather erratic.

 

any way of fixing it?

 

thanks for your help!

Share this post


Link to post
Share on other sites

I Solved it. It was my fault :(

 

I changed something on the script

 

 

I replaced that line

    call_menu if Mouse.rclick? and !$game_map.interpreter.running?

with this one

    call_menu if Mouse.rclick? and !$game_map.interpreter.running? and $game_switches[5] 

I did this because right click called the menu even though the menu permission was denied, so I made Switch 5 to be the "mouse menu permission"

 

So, instead I just deleted that line and it solved the problem

Edited by Krazlegan

Share this post


Link to post
Share on other sites

Hello, Vlue,

Great work. I have been trying to make it work with Yami's classic ATB system. But I can't seem to be able

to select enemy targets in battle (nor can I scroll through actions). I switched the battle engine to the default turn base, it still couldn't do it. Is it because of the battle systems that I used, or it just can't work during battles?

 

Share this post


Link to post
Share on other sites

If you provide a link to the script, I can take a look when I have a moment.

Share this post


Link to post
Share on other sites

Thanks for the quick reply.

Here it is. I think classic turn-based is too boring. Active bars give more flavor to fights.

http://rpgmaker.net/scripts/174/

 

Of course it requires Yanfly's battle engine.

https://dl.dropbox.com/u/17078211/Scripts/YEA/Ace_Battle_Engine.rb

 

 

Ah! And there is also a bug fix from double X.

http://rpgmaker.net/scripts/367/

Hopefully, there are no bugfixes for bugfixes.

 

 

There are two main issues during battles. One is that it can't scroll. The other is that it can't select enemy targets. It's fixed on the first enemy all the time. I also tried Jet's. His can scroll. But I still could not select targets. I like yours better. Hopefully, it can work out. I am really close to the end of my first game. Thank you ahead.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×