[XP] Mouse Controller Enhancement Script

Started by nathmatt, March 24, 2010, 08:31:41 pm

Previous topic - Next topic

nathmatt

March 24, 2010, 08:31:41 pm Last Edit: July 07, 2012, 01:58:11 pm by nathmatt
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



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
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


ForeverZer0

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.

G_G

WEll it doesnt have path pathfinding at all. It has some. It won't avoid obstacles to get to the designated area though.

Blizzard

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 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

March 25, 2010, 07:23:39 am #4 Last Edit: March 27, 2010, 09:27:08 am by nathmatt
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
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


Ryex

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.<br /><br />DropBox, the best free file syncing service there is.<br />

nathmatt

March 27, 2010, 07:33:16 pm #6 Last Edit: March 27, 2010, 07:36:53 pm by nathmatt
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  
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


element

March 28, 2010, 04:12:44 am #7 Last Edit: March 28, 2010, 04:30:43 am by Trainer Element
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  :<_<:

nathmatt

March 31, 2010, 09:41:17 am #8 Last Edit: March 31, 2010, 05:52:42 pm by nathmatt
update fixed small error with the y to fix it

replace
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
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
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


element

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.

Ryex

Quote from: nathmatt on March 31, 2010, 09:41:17 am
update fixed small error with the y to fix it

replace
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
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.<br /><br />DropBox, the best free file syncing service there is.<br />

Wizered67

Quote from: Professor Ryexander Elm on April 01, 2010, 07:55:46 pm
Quote from: nathmatt on March 31, 2010, 09:41:17 am
update fixed small error with the y to fix it

replace
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
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

Tyril132

April 01, 2010, 08:25:39 pm #12 Last Edit: April 01, 2010, 08:27:22 pm by Tyril132
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.
Lv. 7 Writer | Lv. 7 Composer | Lv. 7 Mapper | Lv. 4 Eventer | Lv. 0 Scripter | Lv. 1 Spriter
DSC Project Soundtrack
Personality Index:: ShowHide

Ryex

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 />

Subsonic_Noise

I like this script, especially the part where it does nothing at all in my game. But that probably is my fault.

Tyril132

Quote from: Shiny Magikarp on April 02, 2010, 01: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.


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
Personality Index:: ShowHide

Subsonic_Noise

Quote from: Tyril132 on April 02, 2010, 01:45:08 pm
Quote from: Shiny Magikarp on April 02, 2010, 01: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.


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.

nathmatt

April 02, 2010, 04:37:51 pm #17 Last Edit: April 02, 2010, 05:40:53 pm by nathmatt
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
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


Subsonic_Noise

Quote from: nathmatt on April 02, 2010, 04:37:51 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

nathmatt

April 02, 2010, 05:46:52 pm #19 Last Edit: April 12, 2010, 04:07:15 pm by nathmatt
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.

Spoiler: ShowHide
Did i just use the word using 4 times lol.
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