[XP] Mouse Controller

Started by Blizzard, October 09, 2009, 09:18:19 am

Previous topic - Next topic

Blizzard

October 09, 2009, 09:18:19 am Last Edit: October 07, 2021, 10:30:07 am by Blizzard
Mouse Controller
Authors: Blizzard
Version: 2.3
Type: Custom Input System
Key Term: Misc System

Introduction

This script can work as a stand-alone for window option selections. To be able to use the mouse buttons, you need a custom Input module. The supported systems are "Custom Game Controls" from Tons of Add-ons, Blizz-ABS Custom Controls and RMX-OS Custom Controls. This script will automatically detect and apply the custom input modules' configuration which is optional.

This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteMouse Controller licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić

Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteMouse Controller licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic

In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Mouse Controller created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.


Features

  • fully automated mouse control in game
  • can be enhanced with "Custom Game Controls" from Tons of Add-ons
  • can be enhanced with "Blizz-ABS Controls"
  • can be enhanced with "RMX-OS"
v2.0b
  • added option to hide Windows' cursor
  • added possibility to hide and show the ingame cursor during the game
  • added possibility to change the cursor icon
  • added several new options
  • optimized
v2.1b
  • added support for .cur and .ani cursor files instead of sprites
  • changed code to use system cursor rather than a sprite to greatly increase performance
v2.2b
  • removed hardware cursor support due to problems with display in fullscreen (which cannot be fixed)
  • added option to specify a custom game name if Game.ini is not present
v2.3
  • added new license
  • added usage and crediting instructions


Screenshots

N/A

Demo

Mouse Controller

Script

Just make a new script above main and paste this code into it.
Script Download

Instructions

Inside the script in the first comment.

Compatibility

90% compatible with SDK v1.x. 80% compatible with SDK v2.x. May cause incompatibility issues with other custom input Systems. Works with "Custom Game Controls" from Tons of Add-ons and Blizz-ABS's custom controls.
This script is not meant to be used as a standalone but rather in combination with special menus that are properly adapted to support a mouse controller system.

Credits and Thanks

  • Boris "Blizzard" Mikić

Author's Notes

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

October 09, 2009, 09:20:21 am #1 Last Edit: October 09, 2009, 09:21:30 am by RoseSkye
You suck as a scripter and you should feel bad.
Nah, it's actually a pretty nifty script. Level Up.. your sister.

Edit: I'm actually giggling thinking about when you copy and paste this and get the chance to read this. Oh man you'll be so angry I'll probably be banned again. TEEHEE!

Calintz

Wasn't this system requested and longed for by many many many people!?
Good job Blizzard. You know, you're a train that never stops rolling, aren't you??

Blizzard

The most important part is that it's compatible with all my custom Input modules. xD

@Rose: Unlike all the other mouse scripts out there, this one was coded cleanly and most probably won't mess up other scripts.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Magus

Quote from: Blizzard on October 09, 2009, 09:26:23 am
The most important part is that it's compatible with all my custom Input modules. xD

@Rose: Unlike all the other mouse scripts out there, this one was coded cleanly and most probably won't mess up other scripts.

How does he come up with these insane scripts XD I think I can use this in an awesome mini-game as well.
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

RoseSkye

Quote from: Blizzard on October 09, 2009, 09:26:23 am
The most important part is that it's compatible with all my custom Input modules. xD

@Rose: Unlike all the other mouse scripts out there, this one was coded cleanly and most probably won't mess up other scripts.


Its like you didn't see the fine print :/

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

My question to you Blizzard.
Was it arduous to make it 100% compatible with your other input modules??

Like, did you have to go through any other scripts to ensure compatibility, or did you write the script to be compatible from the beginning??

Blizzard

The latter. I intended this to be used in RMX-OS (and Blizz-ABS) which has a copy of my custom Input module included. I will make a special plugin later that allows the player to use the mouse in Blizz-ABS for attacks, etc.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

October 09, 2009, 09:46:18 am #9 Last Edit: October 09, 2009, 09:48:01 am by Calintz
Very nice ...
It honestly seems that you have no real limitations.

Your only limits are the limits of the engines you use.
You're the best. There's no doubt in my mind.

However, the description says windows selections.
Can the mouse be used over the gameplay map??

Blizzard

If you mean point-click-walk, no. This script is more of a tool to develop something else using it than an actually useful standalone script, but it can be used separately.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

What about point (determines the tile the cursor is in) and upon click, run event??
I mean, I know it doesn't contain this feature, but is this feature feasible??

Blizzard

Of course it is. A plugin like that would be less than 20 lines long (including aliasing, class/method definition and compatiblity check).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

Neat ...
I've got nothing more to say.

I'm sure if game_guy gets his eyes on this topic ... he'll make that plugin. Even Aqua for that matter.
This could make for many interesting new things.

G_G

suggestion, can you make your regular cursor visible on/off? The reason is I tried the demo and my cursor was covering the sprite.

Blizzard

I don't really see the point. It's a mouse cursor, it's above all, always.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

No like the sprite that was in the game, the yellow cursor was displaying beneath my cursor. Shouldnt it display above instead?

Blizzard

October 09, 2009, 02:51:31 pm #17 Last Edit: October 09, 2009, 02:52:44 pm by Blizzard
You don't see Windows' cursor when you're in fullscreen. How else would you see the mouse cursor if it wasn't a game-internal sprite? Not counting very, very bad hacking and a couple of very nasty Win32API calls.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

<3

I would make plug-ins for this & Blizz-ABS... but...
NO TIME ;_____;

Maybe someday... :x

Alton Wyte

Sorry for necropost, but this doesn't seem to work during name entry, but it works everywhere else. No errors, it just ignores this script during it.

Blizzard

That's possible. :/ I'll take a look at it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

element

The mouse follows me but i cant seem to klick on anything.
I think it just isnt overriding the confirm button (space bar)

If I would be able to click with it, can I walk with it then ?

Ryex

this dose not override the confirm button instead adds its own input check to the game.
and you can't walk with it unless you link it to a path finding script
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

If you want the click to override the confirm button, get Tons of Add-ons, activate Custom Game Controls and set the first / left mouse button as additional or as only confirm button.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

element

and I cant use custom controls for blizz abs so Im waiting for your plugin blizz  :D
Anyway the clicking works without blizz abs
ty very much  :haha:

Blizzard

If you're using Blizz-ABS, just assign the left mouse button as confirm button.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

element

January 10, 2010, 10:59:17 am #26 Last Edit: January 10, 2010, 03:25:08 pm by game_guy
TY It works perfect  :haha:
So your plugin that youre about to make is only for the pathfinding and stuff ?
Or aint I getting the point  :^_^':

EDIT:
Sorry for double post but Is there already a pathfinding script compatible with this ?

Please just edit post instead of double posting ^^ ~ G_G

Blizzard

No, there is no path finding really compatible with this.
Yes, the plugin will be so the player uses pathfinding like allies when you click somewhere. Basically you will use forced actions on the player with the plugin.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

BeAddicted

If I click on New Game there is an error message

Script 'BlizzABS 2' line 2999: ArgumentError occurred
wrong number of arguments(1 for 0)

crzyone9584

Quote from: BeAddicted on February 05, 2010, 12:32:58 pm
If I click on New Game there is an error message

Script 'BlizzABS 2' line 2999: ArgumentError occurred
wrong number of arguments(1 for 0)



Make sure your scripts are in the right order

http://forum.chaos-project.com/index.php/topic,23.0.html

Change the order Not sure how u have it set up. But check the list and follow thats order for the scripts you have in your game.

BeAddicted

ok now I'm in the game and I can only click with the right mouse an then stands there
"unable to find fille Graphics/Characters/001-Fighter01_wpn_1."

element

Then ... Maybe you need to make that graphic ?
It's just a blizz-abs graphic, has nothing to do with the mouse controller.

flautose

February 26, 2010, 10:33:25 am #32 Last Edit: February 26, 2010, 10:42:17 am by flautose
If I did understand the plugin for pathfind will work as if the player clicks somewhere the character will walk in that direction, like finding the way?

I have installed it here and works neatly, so I do have a question: if that path-find is incremented would be possible to interact with an event in the final location by premeditating a final action? I mean if that would be possible to do something like LucasArts Games, I.e: the right button will examine the event the left one will dig, and the middle one will attack (or just open a small menu by clicking on the event coordinates with all those actions or more), would be nice to pick up a item by just clicking on it as well and the hero finds a way to go there.

Blizzard

This is only a mouse controller and it will stay only a mouse controller. What you need is a custom script that utilizes the mouse controller.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

flautose

Ok,

thanks for clearing me that, I've requested for this on the appropriate section then. I just don't get what was that plug-in you were talking about?

Blizzard

The plugin is for Blizz-ABS so you can use the Mouse Controller with Blizz-ABS and turn your game into a point-and-click RPG.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

um Blizz I just realized something I don't think you ever configured the script to define the left or right mouse input buttons... in the auto configure section you refer to Input::key['Mouse Left'] but now where else is it defined... unless douse this require the Tons costume input addon to have those buttons work? Is tones set up so that 'Mouse Left' is all it need to use the proper Win32 API call?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Yes, Custom Controls has them defined. I remember that I made a version upgrade just to add the mouse buttons.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

ah so it appears the the mouse window system I'm making will need both the mouse controller and tones if it is to work properly
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Yup. I made it on purpose like this. If you want a specific system, you need to used a few components for all "low-level" functions that you need. Input module and a mouse controller are not the same thing and they are not similar or related. The only thing they have in common is user input.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Wizered67

I found a bug! Whenever you use an item outside of battle, if you put it between two party members for target, it will go around everyon and you can use an item with a scope of 1 member on all party members!

Blizzard

Blame Enterbrain for putting the selection displays too close together.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

actually its the index -1 just change it to -2 to fix it in the skill command if index is -1 it selects all
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


luchs

add this in main to hide the normal mouse cursor :) IT ROCKS

  cursor = Win32API.new("user32", "ShowCursor", "i", "i" )
  cursor.call(0) # 1=sichtbar,  0=unsichtbar

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

luchs


stripe103

One thing. Is it possible to change the cursor in the game with some kind of script call?

Blizzard

Now you can. *points to instructions*
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

cyclope

It has incompatibility issues with Ccoas UMS and dubeax AMS  :wacko:
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

Sacred Nym

It does? o.O What is the problem exactly?
Quote昨日の自分に「さようなら」
Say "Goodbye" to who you were yesterday.

Magicks

hi =) i have a little problem... if i open the trade window the chara moves when i click on some item
i´m using --> Mouse Controller and Mouse Controller Enhancement

nathmatt

that would be my Mouse Controller Enhancement Script get the new version just fixed it
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


ojp2010

August 29, 2010, 01:23:40 am #52 Last Edit: August 29, 2010, 01:27:54 am by ojp2010
I am having some problems with the Mouse controller system. It isn't letting player touch events work right, I have to click on the square the player touch event is. Like a map transfer event won't work unless I use the mouse to click the ground near it. Is there a way to fix this?

Scripts I am using and in current order
Spoiler: ShowHide

MapLinks
MAW 1.2
Mouse Menu
Skill Shop
Graveyard
MOG - Location_Name
MOG - Treasure_Name
MOG - Item Limit
Ton 0f Addons (1)
Ton 0f Addons (2)
Ton 0f Addons (3)
RMX-OS Options
RMX-OS Script
RMX-OS Global Switches & Variables
RMX-OS Versioning
Blizz ABS (1)
Blizz ABS (2)
Blizz ABS (3)
ABS HUD made by nathmatt
Blizz ABS Controller
Critical Sounds for ABS
Auto-Targeting for ABS
Advanced Time and Environment
Global Day-Night System
Mouse Controller
Mouse Controller Enhancement
Mouse Drop Down Menu
RMX-OS Main


Edit: Then I shall inquire there about my problem thank you.

Wizered67

I'm 99% sure the problem is with nathmatts mouse controller enhancment script, and not this, as this script has nothing to do with events (as far as I know)

phcs666

I have 2 simple requests and 1 "bug" report ( yes, i know blizz is retired...  :'( )

1- On custom game controls ( tons ), theres no way to set up a key for "wheel down" and "wheel up"

2- Is there a way to totally turn off the mouse system ?
To be more specific, i need it turned off on my scene_title because i use picture commands, so i need the keyboard input control returned
Hiding the mouse cursor does not work since it only HIDES the cursor ( it remains active... )

and the "bug" is: the defalt "cursor" SE is not played anymore when selecting a command ( except when u place the mouse cursor beneath a selectable window's edge while holding down the "C" button  :O.o: )

Pardon me for anything miss-wroted, im Brazilian  :ninja:

Blizzard

Quote from: phcs666 on September 18, 2010, 03:40:19 pm
1- On custom game controls ( tons ), theres no way to set up a key for "wheel down" and "wheel up"


I think those were Mouse 4 and Mouse 5.

Quote from: phcs666 on September 18, 2010, 03:40:19 pm
2- Is there a way to totally turn off the mouse system ?
To be more specific, i need it turned off on my scene_title because i use picture commands, so i need the keyboard input control returned
Hiding the mouse cursor does not work since it only HIDES the cursor ( it remains active... )


Then just hide it. If players can't see it, they will assume that it's not working.

Quote from: phcs666 on September 18, 2010, 03:40:19 pm
and the "bug" is: the defalt "cursor" SE is not played anymore when selecting a command ( except when u place the mouse cursor beneath a selectable window's edge while holding down the "C" button  :O.o: )


That's not a bug. The cursor SE is not played when changing the selection. The cursor SE is played when you press UP/DOWN/LEFT/RIGHT.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

phcs666

September 18, 2010, 06:12:06 pm #56 Last Edit: September 18, 2010, 06:13:16 pm by phcs666
QuoteI think those were Mouse 4 and Mouse 5.


I tried but they didnt work, i think those keys are for those side buttons like this

QuoteThen just hide it. If players can't see it, they will assume that it's not working.


But the problem is exactly because it remains active, the keyboard arrows dont work anymore ( up and down )
I use a condition: case @command_window.index
The condition is "when a command is selected", not "if input up or down"

QuoteThat's not a bug. The cursor SE is not played when changing the selection. The cursor SE is played when you press UP/DOWN/LEFT/RIGHT.


Hmm, thats why i wrote "bug" inside of ""s  :P
Then how can i make the cursor SE be played when changing the selection ?  :hm:

nathmatt

September 18, 2010, 09:17:01 pm #57 Last Edit: September 18, 2010, 09:18:02 pm by nathmatt
put this in the update method to play the se using the mouse
if @command_window.index >=0 && @command_window.index != @index
 @index = @command_window.index
 $game_system.se_play($data_system.cursor_se)
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


phcs666

Quote from: nathmatt on September 18, 2010, 09:17:01 pm
put this in the update method to play the se using the mouse
if @command_window.index >=0 && @command_window.index != @index
  @index = @command_window.index
  $game_system.se_play($data_system.cursor_se)
end



Its works on the title screen, but i was expecting it to work on every scene  :o ( i dont want to make this condition to every command window on my project >< )

nathmatt

place this below the mouse controller
class Window_Selectable < Window_Base
 
  alias update_mouse_se update
  def update
    if @last_index != @index
      @last_index = @index
      Audio.se_stop
      $game_system.se_play($data_system.cursor_se) if @index >= 0
    end
    update_mouse_se
  end

end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


phcs666

September 19, 2010, 12:08:55 am #60 Last Edit: September 19, 2010, 12:10:26 am by phcs666
Quote from: nathmatt on September 18, 2010, 09:45:06 pm
place this below the mouse controller
class Window_Selectable < Window_Base
 
 alias update_mouse_se update
 def update
   if @last_index != @index
     @last_index = @index
     Audio.se_stop
     $game_system.se_play($data_system.cursor_se) if @index >= 0
   end
   update_mouse_se
 end

end



Thank you nathmatt, it works perfectly
It was lagging a lot so i removed the "Audio.se_stop" and it works better now  :haha: thank you again

phcs666

Sorry for double posting but, i was making some searches here about that ASCII thing, hexadecimal values and decimal values, it seems that theres no value for the "wheel down" and "wheel up" commands :(

Hope im wrong =x

element

People need to learn that there is a EDIT button.
AND THEN USE IT

Blizzard

Quote from: phcs666 on September 19, 2010, 02:22:43 pm
Sorry for double posting but, i was making some searches here about that ASCII thing, hexadecimal values and decimal values, it seems that theres no value for the "wheel down" and "wheel up" commands :(

Hope im wrong =x


Then there's not help for you.

And yes, please use "Modify" button the next time instead of double posting.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

phcs666

Got it, ill never double post again.

QuoteThen there's not help for you.

Well then i will try to make another way on my controls...

And, err, i found a "bug" ( i dont know if it is actualy a bug )

In battle ( default battle system ), the mouse cursor dont work when selecting a target ( thats why i was trying to setup the "left" and "right" keys to the mouse wheel "up" and "down" >< )

Off: damn im causing so much trouble  :o

Blizzard

Well, as I said in the first post...

Quote from: Blizzard on October 09, 2009, 09:18:19 am
This script is not meant to be used as a standalone but rather in combination with special menus that are properly adapted to support a mouse controller system.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

phcs666

Quote from: Blizzard on September 19, 2010, 04:24:45 pm
Well, as I said in the first post...

Quote from: Blizzard on October 09, 2009, 09:18:19 am
This script is not meant to be used as a standalone but rather in combination with special menus that are properly adapted to support a mouse controller system.



Oh right, i missed that, well then will adapt it myself ^^

So, there is no way to completly turn off the mouse controller ? ( since it remains active even if the cursor is hidden ), i think its a vital function, and i mean, im not requesting it especially for me, for example in cutscenes, even if the mouse cursor is hidden ( even with an event set as "automatic start" ), it can cause problems if the player keeps clicking and moving the mouse arround ( using mouse controller enchantment script for example, wich make it possible to start events by clicking on then )

nathmatt

mces can be disabled with
$MCES.disabled = true turn it off with false
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


phcs666

Quote from: nathmatt on September 19, 2010, 05:03:51 pm
mces can be disabled with
$MCES.disabled = true turn it off with false



I know, can something like this be done on the main mouse controller script ? ( so picture menus can work )

nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


phcs666

September 19, 2010, 05:38:22 pm #70 Last Edit: September 27, 2010, 12:54:16 pm by phcs666
Quote from: nathmatt on September 19, 2010, 05:26:51 pm
thats why i made this http://forum.chaos-project.com/index.php/topic,6552.0.html


OMFG, how could i miss that ( and i though that i checked the script database twice )

That solves all my problems *-* ( how does that lvl up thing works ? )

EDIT: damn, it took me a while to understand your Picture Command script, it does'nt help me the way i through.

To be extremely clear, i made 2 vids ( 200kb ), one with the mouse controller and another one without it, the vids speak more than words ( this is my last attempt for a "$mouse.disabled = true" function T_T )

http://www.mediafire.com/?62efzbzrhd8pcry

EDIT: nathmatt just PMed me and its fixed now, nath, dont you think that your fix should be posted here and also added to the thread ?




Quote from: Blizzard on September 19, 2010, 02:43:00 pm
Quote from: phcs666 on September 19, 2010, 02:22:43 pm
Sorry for double posting but, i was making some searches here about that ASCII thing, hexadecimal values and decimal values, it seems that theres no value for the "wheel down" and "wheel up" commands :(

Hope im wrong =x


Then there's not help for you.

And yes, please use "Modify" button the next time instead of double posting.


Just to put an end to this "mouse wheel" thing: http://www.4shared.com/file/122306875/84e3bc85/PR_Mouse_Z.html

This is a mouse wheel system created by pedro(HCDO) from PRCoders, maybe you want to add this function to your input modules ( im not requesting, his system already works fine with your input modules )  :)

cyclope

 hi, is there a way to make Scene_Hotkey from blizz abs to be used with this script????? :???:
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

nathmatt

best way would be to make both windows active that way you can just click on them might also have to add a if index >= 0 to make sure it only works if ur over it
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


cyclope

Quote from: nathmatt on September 27, 2010, 03:55:05 pm
best way would be to make both windows active that way you can just click on them might also have to add a if index >= 0 to make sure it only works if ur over it

That will work when choosing the item/skill but when selecting the number of hotkey?
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

nathmatt

you could check for the input of 1 of the number keys and add the 1 selected
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


cyclope

I am not a scripter, but if you could guid me to make this work will really apreciate
Things I Hate

1. People who point at their wrist asking for the time... I know where my watch is pal, where the hell is yours? Do I point at my crotch when I ask where the toilet is?

2. People who are willing to get off their a** to search the entire room for the TV remote because they refuse to walk to the TV and change the channel manually.

3. When people say "Oh you just want to have your cake and eat it too". Damn Right! What good is cake if you can't eat it?

4. When people say "it's always the last place you look". Of course it is. Why the hell would you keep looking after you've found it? Do people do this? Who and where are they?

5. When people say while watching a film, "did ya see that?" No Loser, I paid $12 to come to the cinema and stare at the damn floor!

6. People who ask "Can I ask you a question?"... Didn't give me a choice there, did ya sunshine?

karldaylo

April 20, 2011, 04:28:52 am #76 Last Edit: April 20, 2011, 04:52:44 am by karldaylo
This is a very awesome script...

but i do have one thing i want to ask (or request :P)

im using this mouse controller script.... is there any calling script for this to able to click an event and make it work(the event)
if it wasnt included on its features.. can you recommend me one?
(i liked this script... so if ever there is one, is there any chance that this two including the one you recomend to work up together by disabling some features from another mouse system?)

cuz im some part of my game requires to click a moving event for them to activate what ever event system included inside that event..
(like perhaps, a gopher, and temporary your mouse icon was changed to a hammer, so if i clicked them.. they suppose to change sprite as they were hitted and some more events commands )

thank you for the help

EDITED: this isnt compatible within UMN of Ccoa, but it tried to disable (by putting # befor the statement on that line) the line statement for it to fully worked... i hope there arent any compatibility issue will happen in future :D ( i was just sayin.. for at leats if this case is solved, i will able to put the error statement that poped out...which i forgot where xD)
RESPECT LIST:Blizzard, Game_guy, Foreverzer0, Winkio, Nathmatt

Blizzard

January 08, 2014, 01:57:26 pm #77 Last Edit: January 11, 2014, 02:29:20 pm by Blizzard
I kinda got annoyed by the slow software cursor while playing PRO so I updated the script to use .cur and .ani files instead of a sprite.

EDIT: Sadly I had to remove it again because RMXP is retarded.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

dullman

August 08, 2014, 03:35:59 am #78 Last Edit: August 08, 2014, 11:42:27 am by dullman
Sorry for necro, but i have some questions about script.
First i planned to have when we have mouse in are between first row and border, or last row and border the window will scroll, so i changed mouse_in_inner_area to mouse_in_are, but here some problems i have:
- First when it scrolling down it displays empty slots (without any text) how to force window to updates non-visible elements to display??
- And Second scrolling speed is high, too high is there any idea how to slow down scrolling (The only thing to come is to pause game for e.g. 10 frames, but i don't know command which would have this effect).
I appreciate any help that i can get so don't be shy and answer.

EDIT I resolved a problem if someone is interested i forgot to update self.contents.bitmap size to new one