Author Topic: [XP] Mouse Controller Enhancement Script  (Read 40129 times)

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
[XP] Mouse Controller Enhancement Script
« on: March 25, 2010, 03:31:41 AM »
Mouse Controller Enhancement Script
Authors: Nathmatt
Version: 1.72
Type: ADD_ON
Key Term: Custom Movement System

Introduction
Adds movement by clicking the mouse to the Mouse Controller Script by Blizzard
Requires Mouse Controller by Blizzard

Features
  • Movement by clicking the mouse
  • Activate events when you reach them by clicking
  • Activate events by clicking on them
  • Allows changing the mouse icon while over a special named event
  • Allows displaying text over special named event while the mouse is over them
  • Configurable no click terrain tag
  • Configurable event message text color
  • Configurable event message text size
  • Configurable click graphic that will be placed when you click on a location
  • Configurable range if clicked distance is higher than the set range you will not move
  • Allows right click event commands
  • Allows unlocking doors doors
  • Allows disabling with $MCES.disabled
  • Allows disabling movement with $MCES.movement_disabled
  • Allows true event clicking meaning if you click an empty spot on the sprite it will not run

Screenshots
no screenshot needed

Demo

No Demo

Script
(click to show/hide)

Instructions

place below Mouse Controler

in the script

Compatibility
not compatible with pixel movement will automatically turn it off

Credits and Thanks

  • Nathmatt
  • Blizzard for the Mouse Controller script and the path finder from Blizz-Abs
  • Near Fantastica and Zeriab for the input module that allows you to use without any other input modules

Author's Notes
Any suggestions for updates are appreciated
« Last Edit: July 07, 2012, 07:58:11 PM by 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
(click to show/hide)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #1 on: March 25, 2010, 03:42:06 AM »
Great job, man. I've been wanting something like this. This should work well..

*powers up*
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #2 on: March 25, 2010, 04:22:17 AM »
WEll it doesnt have path pathfinding at all. It has some. It won't avoid obstacles to get to the designated area though.

Online Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Mouse Path Finder Add On
« Reply #3 on: March 25, 2010, 02:04:15 PM »
You beat me to it. Yes, I was going to say the same. It's not a path finder, it's a direct movement controller.
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 nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Mouse Path Finder Add On
« Reply #4 on: March 25, 2010, 02:23:39 PM »
yea i noticed that working on ripping the 1 from Blizz~ABS  with credit of course

edit: forget to say i successfully ripped the path finder from Blizz~ABS
« Last Edit: March 27, 2010, 04:27:08 PM by 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
(click to show/hide)

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5131
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #5 on: March 28, 2010, 02:27:10 AM »
Code: [Select]
p result unless result == nil... you forgot to remove the debug stuff
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.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Mouse Path Finder Add On
« Reply #6 on: March 28, 2010, 02:33:16 AM »
oops my bad will remove now

edit actually you can go ahead and remove the entire Game_Player class in my script it doesn't use that  
« Last Edit: March 28, 2010, 02:36:53 AM by 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
(click to show/hide)

Offline element

  • Ethereal Devastator
  • ****
  • Posts: 457
  • LV: 2
  • Gender: Male
  • Fountain of Inspiration
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #7 on: March 28, 2010, 10:12:44 AM »
It doesn't work with me.
I set up everything in blizz abs, do i have to set anything up in the pathfinder ?

EDIT : OK... I'ts not compatible with Blizz-ABS V 2.57  :^_^':
I was still using that version becouse of all of the sprites you have to make in 2.7...
Think I should start thinking of hopping over to V 2.7  :<_<:
« Last Edit: March 28, 2010, 10:30:43 AM by Trainer Element »

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Mouse Path Finder Add On
« Reply #8 on: March 31, 2010, 03:41:17 PM »
update fixed small error with the y to fix it

replace
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_x / 4) / 32
    return x, y
  end
with this
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_y / 4) / 32
    return x, y
  end

edit:    I made it with Blizz-ABS ver 2.57 i am not sure y it wouldn't be working for you ?
edit 2: Are you getting an error message or is it just not working ?
edit 3: Fixed where if you were to click the mouse for the message window the  player would move
« Last Edit: March 31, 2010, 11:52:42 PM by 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
(click to show/hide)

Offline element

  • Ethereal Devastator
  • ****
  • Posts: 457
  • LV: 2
  • Gender: Male
  • Fountain of Inspiration
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #9 on: March 31, 2010, 06:44:25 PM »
just won't work
But i'll look in to it another time
Don't have much time to check things that can cause it now.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5131
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #10 on: April 02, 2010, 01:55:46 AM »
update fixed small error with the y to fix it

replace
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_x / 4) / 32
    return x, y
  end
with this
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_y / 4) / 32
    return x, y
  end

edit:    I made it with Blizz-ABS ver 2.57 i am not sure y it wouldn't be working for you ?
edit 2: Are you getting an error message or is it just not working ?
edit 3: Fixed where if you were to click the mouse for the message window the  player would move

um those codes are exactly the same...
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.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #11 on: April 02, 2010, 02:01:46 AM »
update fixed small error with the y to fix it

replace
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_X / 4) / 32
    return x, y
  end
with this
Code: [Select]
def pos
    x, y = self.position
    x = ( x + $game_map.display_x / 4) / 32
    y = ( y + $game_map.display_Y / 4) / 32
    return x, y
  end

edit:    I made it with Blizz-ABS ver 2.57 i am not sure y it wouldn't be working for you ?
edit 2: Are you getting an error message or is it just not working ?
edit 3: Fixed where if you were to click the mouse for the message window the  player would move

um those codes are exactly the same...

no they aren't, look at X and Y on second line

Offline Tyril132

  • Transcended Spirit
  • ***
  • Posts: 182
  • LV: 11
  • Gender: Male
  • 8-bit Style, 16-bit Attitude
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #12 on: April 02, 2010, 02:25:39 AM »
In the first code snippet, $game_map.display_x is listed twice.

In the second code snippet, this is addressed by changing the second variable to $game_map.display_y, as was probably the original intent.
« Last Edit: April 02, 2010, 02:27:22 AM by Tyril132 »
Lv. 7 Writer | Lv. 7 Composer | Lv. 7 Mapper | Lv. 4 Eventer | Lv. 0 Scripter | Lv. 1 Spriter
DSC Project Soundtrack
(click to show/hide)

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5131
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #13 on: April 02, 2010, 04:34:14 PM »
*facepalm*
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.

DropBox, the best free file syncing service there is.
(click to show/hide)

Subsonic_Noise

  • Guest
Re: [XP] Mouse Path Finder Add On
« Reply #14 on: April 02, 2010, 07:28:18 PM »
I like this script, especially the part where it does nothing at all in my game. But that probably is my fault.

Offline Tyril132

  • Transcended Spirit
  • ***
  • Posts: 182
  • LV: 11
  • Gender: Male
  • 8-bit Style, 16-bit Attitude
    • View Profile
Re: [XP] Mouse Path Finder Add On
« Reply #15 on: April 02, 2010, 07:45:08 PM »
I like this script, especially the part where it does nothing at all in my game. But that probably is my fault.

Nothing at all is better than a fatal script error. Well... unless you're intentionally trying to break the script for testing. :P
Lv. 7 Writer | Lv. 7 Composer | Lv. 7 Mapper | Lv. 4 Eventer | Lv. 0 Scripter | Lv. 1 Spriter
DSC Project Soundtrack
(click to show/hide)

Subsonic_Noise

  • Guest
Re: [XP] Mouse Path Finder Add On
« Reply #16 on: April 02, 2010, 08:09:03 PM »
I like this script, especially the part where it does nothing at all in my game. But that probably is my fault.

Nothing at all is better than a fatal script error. Well... unless you're intentionally trying to break the script for testing. :P
My game has about 30-40 scripts, some of them are written by myself and don't do anything. It was about time for compatibility issues.

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Mouse Path Finder Add On
« Reply #17 on: April 02, 2010, 10:37:51 PM »
are you making sure you have either tons custom controls on or Blizz-ABS are you also making sure that you have the original mouse script by blizzard and that they are both below Blizz-ABS
« Last Edit: April 02, 2010, 11:40:53 PM by 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
(click to show/hide)

Subsonic_Noise

  • Guest
Re: [XP] Mouse Path Finder Add On
« Reply #18 on: April 02, 2010, 10:41:55 PM »
are toy making sure you have either tons custom controls on or Blizz-ABS are you also  making sure that you have the original mouse script by blizzard and that they are both below Blizz-ABS
yep, I checked both, it's in the right order. Still nothing happens when I click. oO

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Mouse Path Finder Add On
« Reply #19 on: April 02, 2010, 11:46:52 PM »
Is Scene_Map update being aliased in any of the scripts you are using i may be using a variable or or something one of the many scripts you are using is using.

(click to show/hide)
« Last Edit: April 12, 2010, 10:07:15 PM by 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
(click to show/hide)