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.

Battle Target icon modification

I requested this a few times, but to no avail. No harm trying again, eh? Well, here's how it goes. I need a script that'll either:

- Change the target icon (in battle) into an animation that loops itself. Of course, without interfering with the other animations (i.e. status effects) or...

- Increase the amount of frames for the target icon (in battle).
 
EDIT: Oops! Forgot to check the date! Sorry. But if Kyoru or anyone needed it anyway, I'll let it stay here. I'm sorry.
Code:
#==============================================================================
# ** Arrow_Base
#------------------------------------------------------------------------------
#  This sprite is used as an arrow cursor for the battle screen. This class
#  is used as a superclass for the Arrow_Enemy and Arrow_Actor classes.
#==============================================================================

class Arrow_Base < Sprite
 #--------------------------------------------------------------------------
 # * Aliases
 #--------------------------------------------------------------------------
 alias initialize_orig initialize
 alias update_orig update
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     viewport : viewport
 #--------------------------------------------------------------------------
 def initialize(viewport)
   # Initialize a parameter
   @angle = 0
   # Original initialize method
   initialize_orig(viewport)
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update cursor movement
   phase
   # Original update method
   update_orig
 end
 #--------------------------------------------------------------------------
 # * Define Cursor Movement
 #--------------------------------------------------------------------------
 def phase
   # Cycle @angle from 0 to 2pi
   if @angle < 2 * Math::PI
     @angle += Math::PI / 10
   else
     @angle = 0
   end
   # Set y position
   self.oy = 64 + ((Math.sin(@angle))*16).round
   # Set tone
   # In the below line, the three 90s are values for red, green and blue. You may need to tweek them to suit your battle cursor.
   self.tone = Tone.new((Math.sin(@angle)*90).round, (Math.sin(@angle)*90).round, (Math.sin(@angle)*90).round)
 end
end

Paste this in a page right below Arrow_Base or anywhere below Arrow_Base. A friend of mine did this for me. This doesn't increase the animation frames or anything what you wanted, but it's more interesting than the regular RMXP battle Cursor:yes:

BTW, credit Fantasist for this.
 

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