Mouse Controller Edit

Started by Wizered67, May 13, 2010, 08:41:34 pm

Previous topic - Next topic

Wizered67

May 13, 2010, 08:41:34 pm Last Edit: May 13, 2010, 08:50:32 pm by Wizered67
Hello, it's me again with my second request. This time, I'm looking for a slight edit to the mouse controller script.
Right now, when you use an item and are selecting its target, when you put the mouse in between 2 party members, it highlights them all allowing items with a scope of 1 to be used on all party members.
Is there anyone here willing to edit the mouse controller to fix this? Thanks in advance.

Here's a screenshot
Spoiler: ShowHide

nathmatt

place this below the mouse script

Spoiler: ShowHide
#===============================================================================
# Window_Selectable
#===============================================================================

class Window_Selectable
 
  def update_mouse
    if self.mouse_in_inner_area?
      update_mouse_selection
      return
    end
    self.index = -2
    if self.contents != nil && @selections.size > 0 && self.mouse_in_area?
      update_mouse_scrolling
    end
  end
 
  def update_mouse_selection
    update_selections if @selections.size != @item_max
    @selections.each_index {|i|
        if @selections[i].covers?($mouse.x - self.x - 16 + self.ox,
            $mouse.y - self.y - 16 + self.oy)
          self.index = i if self.index != i
          return
        end}
    self.index = -2
  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


Wizered67

May 18, 2010, 06:45:10 pm #2 Last Edit: May 18, 2010, 09:58:09 pm by Wizered67
thank you very much!

edit: Hmmm...... I'm getting an intresting error. When I use this, even when I should be able to use the item, it makes a buzzer sound. Then, after I leave the menu, the items effects seem to apply..... Maybe its just me..... I'm gonna try again....

edit 2: No, it is not just me! When I select it, it plays the buzzer and the hp or whatever doesn't change. Howevere, once I leave the menu completely, the health is restored, but the items are still there......

edit 3: Nevermind, I think it was my fault

edit 4: when I try it in the demo, it works fine. However, it doesn't in my project. I think it may be another scripts fault. Do you know if any of these would mess with it?
Spoiler: ShowHide
Default Scripts
Gameover script by Jackolas
Zero addons
Blacksmith system
Tons of Addons
RMX-OS Options
RMX-OS script
Game guy's quest log and its RMX-OS plugin
Global switches and variables for RMX-OS
ATES
ATES RMX-OS Pluggin
Mouse Controller
Drop down menu for rmx-os
RMX-OS Main


nathmatt

im not sure use ctrl + shift + f and search for Window_Selectable and see if any of the scripts mess with 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


Wizered67

It turns out the script causing it is the addon collection by forevor zero. However, the only script there that affects window_selectable, I don't use.....

ForeverZer0

Quote from: Wizered67 on May 19, 2010, 07:13:47 pm
It turns out the script causing it is the addon collection by forevor zero. However, the only script there that affects window_selectable, I don't use.....


that script is a sub-class of window_selectable, but try commenting it out, or even erasing the script out of the collection and see if your still getting the same error. It won't hurt anything to erase it.
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.

Wizered67

Even when I completely remove that section, I still have the same problem. However, when I comment out the entire script, it works fine....

ForeverZer0

Quote from: Wizered67 on May 19, 2010, 08:15:11 pm
Even when I completely remove that section, I still have the same problem. However, when I comment out the entire script, it works fine....


Does it do even without nathmatt's little scriptlet?
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.