Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Mouse System Tankentai Patch
- #==============================================================================
- # Author : OriginalWij
- # Version : 1.2
- #==============================================================================
- #==============================================================================
- # Changes:
- #
- # v1.0
- # - Initial release
- #
- # v1.1
- # - Fixed enemy selection bug
- # - Added support for enemy info add-on
- #
- # v1.2
- # - Fixed issue with being unable to select dead party members for
- # things such as revival items/skills (added by Mr. Bubble)
- #==============================================================================
- #==============================================================================
- # Insert this script BELOW "Sideview 2" script
- #
- # NOTE: You can delete this script if not useing Tankentai
- #==============================================================================
- #==============================================================================
- # Scene_Battle (Overwrite)
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # Select member
- #--------------------------------------------------------------------------
- def select_member(actor = false)
- members = $game_party.members if actor
- members = $game_troop.members unless actor
- loop do
- update_basic
- @cursor_flame = 0 if @cursor_flame == 30
- @cursor.src_rect.set(0, 0, 32, 32) if @cursor_flame == 29
- @cursor.src_rect.set(0, 32, 32, 32) if @cursor_flame == 15
- point = @spriteset.set_cursor(actor, @index)
- @cursor.x = point[0]
- @cursor.y = point[1]
- @cursor_flame += 1
- # Check for mouse-over target (added by OriginalWij)
- for i in 0..members.size - 1
- next unless members[i].exist? || (members[i].dead? && actor) # v1.2
- point = @spriteset.set_cursor(actor, i)
- mx = point[0] - (point[2] / 2)
- my = point[1] - (point[3] / 2)
- if Mouse.area?(mx, my, point[2], point[3])
- Sound.play_cursor if @index != i
- @index = i
- @help_window2.set_text_n01add(members[@index]) if @help_window2 != nil
- end
- end
- #------------------------------------------------------
- if Input.trigger?(Input::B)
- Sound.play_cancel
- end_target_selection
- break
- elsif Input.trigger?(Input::C)
- Sound.play_decision
- @active_battler.action.target_index = @index
- end_target_selection
- end_skill_selection
- end_item_selection
- next_actor
- break
- end
- if Input.repeat?(Input::LEFT)
- if actor
- cursor_down(members, actor) if $back_attack
- cursor_up(members, actor) unless $back_attack
- else
- cursor_up(members, actor) if $back_attack
- cursor_down(members, actor) unless $back_attack
- end
- end
- if Input.repeat?(Input::RIGHT)
- if actor
- cursor_up(members, actor) if $back_attack
- cursor_down(members, actor) unless $back_attack
- else
- cursor_down(members, actor) if $back_attack
- cursor_up(members, actor) unless $back_attack
- end
- end
- cursor_up(members, actor) if Input.repeat?(Input::UP)
- cursor_down(members, actor) if Input.repeat?(Input::DOWN)
- end
- end
- end
- #==============================================================================
- # Spriteset_Battle (Overwrite)
- #==============================================================================
- class Spriteset_Battle
- #--------------------------------------------------------------------------
- # Set cursor
- #--------------------------------------------------------------------------
- def set_cursor(actor, index)
- return [@actor_sprites[index].x, @actor_sprites[index].y,
- @actor_sprites[index].width, @actor_sprites[index].height] if actor
- return [@enemy_sprites[index].x, @enemy_sprites[index].y,
- @enemy_sprites[index].width, @enemy_sprites[index].height] unless actor
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement