[XP] Mouse Controller Enhancement Script

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

Previous topic - Next topic

phcs666

Quote from: nathmatt on July 24, 2012, 06:10:02 pm
if the location behind the event is unreachable you just need that to have the No_Walk_Tag terrain tag and the the player will not try to reach it as for clicking on the transparent part of the event i did that to have true event clicking it allows you to be able to click on any size graphic or click behind them by clicking on transparent part.   



reaper72004

September 01, 2012, 04:06:09 pm #201 Last Edit: September 02, 2012, 02:22:17 pm by reaper72004
when i click on or next to a enemy "\e[1]" i get a error



scripts:
tons: 7.62
blizz-abs: 2.84
blizz-mouse controller: 2.0
mouse controller enhancement: 1.73

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


reaper72004


Emtec

Hello.

Thanks for such a great script.

I'm testing your script and I'm getting the following error when I use a command (\msg[My Message]) in an event which has a tileset graphic.



If I use any of the other commands (\auto, \commands, etc.) I don't get this error, but events don't work when I click on them. This just happens when the graphic of the event is from the tileset, but if the graphic is a Character it works perfectly.

Could you help me please?

Thank you!

phcs666

December 01, 2012, 09:42:58 am #205 Last Edit: December 01, 2012, 02:34:38 pm by phcs666
How can i get the current tile on Scene_Map that mouse cursor is highlighting?

Spoiler: ShowHide
highlighting - freaking hard word


EDIT: just did it, ignore my question.


x = ($mouse.x + $game_map.display_x / 4) / 32
y = ($mouse.y + $game_map.display_y / 4) / 32


EDIT 2: found 2 bugs:

1. when calling another $scene from Scene_Map while the msg sprite is visible, it remains visible.

2. when trying to save the game, this error occurs:


BigHa

I got an error.It said.

Script 'Mouse Controller Enhancement Script' line 448: NoMethodError
occurred.

undefined method 'each' for nil:NilClass


When I look in Script Editor line 448 is

$scene.spriteset.character_sprites.each { |s|return s if s.character == self}

phcs666

December 13, 2012, 11:25:23 pm #207 Last Edit: December 13, 2012, 11:58:00 pm by phcs666
Found a bug:

When teleporting to a map that has a \msg[] event on it:



And when being on a map that has a \msg[] event on it plus teleporting to a map that also has a \msg[] event on it:


nathmatt

im sorry but i no longer have RMXP so i can't really script in it right now as soon as arc's released i should start scripting again but until then i can't really support any of my scripts
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


PhoenixFire

January 04, 2014, 10:38:06 am #209 Last Edit: January 04, 2014, 10:43:23 am by DigitalSoul
Alright, so I hate to pull up a long dead topic, but I can't seem to figure this one out. I'm using this in conjunction with Blizzards Mouse script, and, his stat distro system. Works great, minus a few minor issues that I think are related, but I don't know what would fix it. When I level up, the stat system comes up, like expected, but when I click distribute points, it makes the noise, and doesn't open up the window  (or it does, but so fast you don't even see it), so you cannot place the points. The other issue I found, that I think might be related, is that when in-battle, you're able to click the attack button, and bring up the fight options, but when you click attack or skill, it doesn't allow you to choose the enemy you're attacking, nor the skill you use..

I'll upload a demo with all of it set up in just a few minutes..

EDIT: Alright, here's the demo.. The zombie looking thing on the left of the map is the enemy. You click to fight, and should level up after 2 fights.. Also, I know the demo looks like crap, I'm just using it to test out things haha.
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

KK20

The Input edit is buggy in this script.

#============================================================================
# Input
#----------------------------------------------------------------------------
#  Adds the mouse trigger commands if not using Blizzards input methods.
#============================================================================ 
module Input
 
  Key = {'Mouse Left' => 1, 'Mouse Right' => 2}
  C = Key['Mouse Left']
  #======================================
  # |->  Keyboard Input Module
  #======================================
  #   By: Near Fantastica
  #   Date: 06.07.05
  #   Version: 3 
  #
  #   Cut down by Zeriab
  #   Date: 16.08.06
  #======================================
  def self.trigger?(key)
    return false if key == nil
    if !Win32API.new("user32","GetKeyState",['i'],'i').call(key).between?(0, 1)
      return true
    else
      return mces_trigger?(key)
    end
  end
 
end

This basically says "As long as the Left Mouse button is held down, Input.trigger?(Input::C) will always return TRUE". But we know that should only apply for Input.repeat?--Input.trigger? should only return true the first time and false after that.

Solution is to put Tons in your game and turn on Custom Controls. That will overwrite the need to use this faulty implementation of Input.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

Uhm, wait. Input#trigger? should return true when the button is held down, but only until Input#update is called the next time. Input#press? keeps returning true while it's held down all the time.
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.

KK20

I kind of figured someone would comment on that. :P
It was what I was I going for in my explanation. Also didn't realize I put "repeat" when I meant "press".

But what I said still stands--Input#trigger? is faulty in this script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

PhoenixFire

Well damn, I really only just need the custom controls, right? In theory I could extract that script out of the Tons pack, and use it separately, yes? I had thought there might be something wrong with the script, but I'm not yet familiar enough with scripting to really have noticed what the error was. Thanks to both of you :)
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

glad300

Is there a way to change the cursor speed ? If there is not, it would be a good add in the future

glad300

Bug : "Stack level too deep" when pressing F12

KK20

That's not a problem with the script, that's a problem with RMXP in general. There are many ways to fix this--you can Google for the one you like. The script database has this one.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

glad300

Well, thank you but now when I restart with F12, an error window tells me that the mouse sprite is disposed

KK20

Mind posting the exact error and the corresponding line of code it's pointing to?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

glad300

Actually, the problem is from the mouse controller script, not the enhancement :^_^':


When I press F12 :

"Script 'Mouse Controller' line 184: RGSSError occured. disposed sprite"