Author Topic: [XP] Mouse Controller  (Read 40024 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
[XP] Mouse Controller
« on: October 09, 2009, 03:18:19 PM »
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:
Quote
Copyright (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:
Quote
Mouse 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:
Quote
Mouse 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
« Last Edit: March 23, 2019, 06:26:04 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline RoseSkye

  • Ban requested
  • Chaos User
  • ******
  • Posts: 1216
  • LV: 59
  • Gender: Male
  • Chaos Project's Black Sheep
    • View Profile
    • Loveless Games
Re: [XP] Mouse Controller
« Reply #1 on: October 09, 2009, 03:20:21 PM »
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!
« Last Edit: October 09, 2009, 03:21:30 PM by RoseSkye »

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Mouse Controller
« Reply #2 on: October 09, 2009, 03:24:17 PM »
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??

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #3 on: October 09, 2009, 03:26:23 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Magus

  • Astral Trancist
  • *****
  • Posts: 545
  • LV: -20
  • Gender: Male
  • Writer of Destiny
    • View Profile
Re: [XP] Mouse Controller
« Reply #4 on: October 09, 2009, 03:27:40 PM »
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 />

Offline RoseSkye

  • Ban requested
  • Chaos User
  • ******
  • Posts: 1216
  • LV: 59
  • Gender: Male
  • Chaos Project's Black Sheep
    • View Profile
    • Loveless Games
Re: [XP] Mouse Controller
« Reply #5 on: October 09, 2009, 03:29:17 PM »
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 :/

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #6 on: October 09, 2009, 03:37:56 PM »
I chose to ignore it. ._.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Mouse Controller
« Reply #7 on: October 09, 2009, 03:42:05 PM »
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??

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #8 on: October 09, 2009, 03:44:31 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Mouse Controller
« Reply #9 on: October 09, 2009, 03:46:18 PM »
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??
« Last Edit: October 09, 2009, 03:48:01 PM by Calintz »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #10 on: October 09, 2009, 03:53:10 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Mouse Controller
« Reply #11 on: October 09, 2009, 03:59:58 PM »
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??

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #12 on: October 09, 2009, 04:02:48 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Mouse Controller
« Reply #13 on: October 09, 2009, 04:16:08 PM »
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.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Mouse Controller
« Reply #14 on: October 09, 2009, 06:36:22 PM »
suggestion, can you make your regular cursor visible on/off? The reason is I tried the demo and my cursor was covering the sprite.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #15 on: October 09, 2009, 06:52:36 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Mouse Controller
« Reply #16 on: October 09, 2009, 06:53:40 PM »
No like the sprite that was in the game, the yellow cursor was displaying beneath my cursor. Shouldnt it display above instead?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Controller
« Reply #17 on: October 09, 2009, 08:51:31 PM »
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.
« Last Edit: October 09, 2009, 08:52:44 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Mouse Controller
« Reply #18 on: October 09, 2009, 10:21:37 PM »
<3

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

Maybe someday... :x

Offline Alton Wyte

  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 0
  • Gender: Female
    • View Profile
Re: [XP] Mouse Controller
« Reply #19 on: December 21, 2009, 06:24:00 AM »
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.