Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Repostioning The Target Cursor In Battle

Status
Not open for further replies.
What I want to do is have the cursor that appears in battle when you are selecting a enemy to attack/use skill on/etc. be focused on the of the battler center instead of near the bottom. Like in the screen shot at the bottom.

(NOTE: I couldn't find a topic that covers this, but sorry if there is one.
Second of all, I know this is a noobish question, but scripting is the one thing I have like zero knowledge on.)


 
There are two things you can do:
1) Go to Arrow_Base in the script editor. You'll find this line somewhere in the beginning: self.ox = 16
Add just next to it: self.oy = 96
This moves the cursor up by 96 pixels in battles, whether the cursor is on the enemy or the actor.
2) Go to Arrow_Enemy and find this line: self.y = self.enemy.screen_y
change it to: self.y = self.enemy.screen_y - 96
This does the same thing the first method does, but only when the cursor in on the enemy. You can do the same thing for the actor if you want in Arrow_Actor.
Hope this helps :)
 
It doesn't work. I forgot to mention this in my first post but could the reason it doesn't work because of other scripts I'm using? I am using Cogwheel's ATB System, Damage Display, and Menu Bars along with Ccoa's UMS.
 
I'm not much into scripting, but I'm suspecting Cogwheel's ATB System. Search for "Arrow_" in all the other scripts you're using. If you find something, search nearby for the lines of code I asked you to change. If you spot them, change them and give it a shot. If you don't find them, I guess I can't be of any more help.
 
I dit that for my FFVI SDK.
Here's my script:)

Code:
#==============================================================================
# ** Game_Battler (part 1)
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :width
  attr_accessor   :height
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias size_game_battler_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    size_game_battler_initialize
    @width = 0
    @height = 0
  end
end
#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display the battler.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================
class Sprite_Battler < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias size_sprite_battler_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    size_sprite_battler_update
    @battler.width = self.bitmap.width
    @battler.height = self.bitmap.height
  end
end
#==============================================================================
# ** Arrow_Enemy
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose enemies. This class inherits from the 
#  Arrow_Base class.
#==============================================================================
class Arrow_Enemy < Arrow_Base
  #--------------------------------------------------------------------------
  # * Get Enemy Indicated by Cursor
  #--------------------------------------------------------------------------
  alias size_arrow_enemy_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    size_arrow_enemy_update
    # Set sprite coordinates
    if self.enemy != nil
      self.x = self.enemy.screen_x + (self.enemy.width/2)
      self.y = self.enemy.screen_y - (self.enemy.height/2)
    end
  end
end
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top