Alright, so I just recently added the Mouse control to my game and i'm in love with it. Everything works great with it, and it's made my game much better. Except for one small problem.
F0's Blacksmith script crashes if the Mouse controller is enabled, and gives me an error in Tons of Add ons' Shaded Text option *Which is off, mind you*. The smithing script works fine with Tons as long as the mouse script isn't in there. So i'm wondering if there's a way to fix it.
Preferably, i'd like the mouse control to work on the Blacksmith script. If there's a way to fix it, i'd appreciate that. If not, is there a way to disable the Mouse Control script when the blacksmith script is activated? I tried $game_system.mouse_control = false and that didn't work.
Thanks kindly to anyone who can help. Not sure what other info to give.
The error pops up when a you try to use #draw_text with the string being nil. It just pops up in Tons because that method aliases the and runs before the normal method. I can't think of anything that in the mouse controller that would cause an error related to text drawing. When exactly does it cause the error?
I'm assuming it's the Mouse Controller because when I remove it, the script works. The error happens when the BS window opens. I can see the "Forge, Extract" options before it crashes.
(http://img.photobucket.com/albums/v247/Taone/error-3.png)
Remove Tons for the time being. It's rerouting the error from somewhere else. Then you will get the actual call that causes the error.
Quote from: Blizzard on June 24, 2012, 11:39:17 am
Remove Tons for the time being. It's rerouting the error from somewhere else. Then you will get the actual call that causes the error.
Just did, now I get this.
(http://img.photobucket.com/albums/v247/Taone/error2.png)
I thought of a possible incompatibility with the mouse script. The command window it uses is not setup to handle help text when there is no active command, since this is not possible using normal controls. Try changing this in the blacksmith script:
# Set help text depending on the selected index.
help_text = case @command_window.index
when 0 then 'Use materials to forge new weapons, armors, and items.'
when 1 then 'Extract materials from weapons, armors, and items.'
when 2 then !@enchants ? 'Exit the shop.' :
'Enchant weapons, armors, and items using other items.'
when 3 then 'Exit the shop.'
#--------------------------------------------------------------------------------
else
''
#--------------------------------------------------------------------------------
end
@help_window.set_text(help_text)
Notice the lines I inserted in there. Change the script in your game to match that and see if it works.
Awesome! It's working now! Thanks alot Blizz and F0. :D
Glad you guys could take the time to help me even if you're done with scripting.