Compatibility fix and question.

Started by Kise, October 17, 2017, 03:05:21 pm

Previous topic - Next topic

Kise

Hello. I have a problem with script for mouse control and little visual improving script, that makes the cursor scroll smoothly. The problem is, that cursor doesn't follow the mouse with this script. Here's demo - https://ufile.io/u2g13

And the question - is it be possible to create a script that would generate smooth outline around an object? ( as an addon for Mousie )

KK20

October 17, 2017, 03:45:31 pm #1 Last Edit: October 17, 2017, 04:01:30 pm by KK20
You needed to set the variable that allowed the window cursor to slide to its destination in X frames.

  #--------------------------------------------------------------------------
  # * Track the position of the mouse cursor
  #--------------------------------------------------------------------------
  def mouse_cursor(index)
    return if @index == index
    @scroll_wait -= 1 if @scroll_wait > 0
    row1 = @index / @column_max
    row2 = index / @column_max
    bottom = self.top_row + (self.page_row_max - 1)
    if row1 == self.top_row and row2 < self.top_row
      return if @scroll_wait > 0
      @index = [@index - @column_max, 0].max
      @cursor_duration = [7 - @cursor_speed, 1].max
      @scroll_wait = 4
    elsif row1 == bottom and row2 > bottom
      return if @scroll_wait > 0
      @index = [@index + @column_max, @item_max - 1].min
      @cursor_duration = [7 - @cursor_speed, 1].max
      @scroll_wait = 4
    else
      @index = index
      @cursor_duration = [7 - @cursor_speed, 1].max
    end
    $game_system.se_play($data_system.cursor_se)
  end


Not sure about the other question. I feel like I've seen it somewhere before.
EDIT: Thinking about it, it would probably be too much effort to be worth it. You would need to generate a new charset graphic every time then alter the Sprite_Character class to somehow draw another sprite and layer the two together. Because using Bitmap#blt multiple times could get slow, a DLL would be recommended. So it's already a lot of work just for one little thing.

I say just use Sprite#flash or RPG::Sprite#blink_on/_off and be done with it.

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!