So I want to mess with the X coordinates (and possibly y coordinates) of my sprites based on certain positions. This is the same as saying if I command my actor to attack the goblin, I want them to move over to the goblin, attack, and jump back into position, or similar FF1 - FF6 tactics.
There's two problems I'm running into. The first is the move animation. Namely, my sprites don't move. I micronized my battle sprite images so my battle looks like this
I made these side sprites (not my original work) by cropping their side views and shrinking them. I set their coordinates based on front, middle, and back positions using the following change to Game_Actor:
#--------------------------------------------------------------------------
# * Get Battle Screen X-Coordinate
#--------------------------------------------------------------------------
def screen_x
# Return after calculating x-coordinate by order of members in party
if self.index != nil
position = $data_classes[self.class_id].position
return 576 - (position * -20)
else
return 0
end
end
I could do the same thing for an animated loop or to play a victory dance, cast spells, and various statuses (sick, stone, levitating, cloaked, etc.) if I knew a bit more about where to look and what to change.
I know messing with the line "self.x = @battler.screen_x" in the following:
class Sprite_Battler
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
# If battler is nil
if @battler == nil
remove_battler
return
end
# If file name or hue are different than current ones
redraw_battler
# If animation ID is different than current one
loop_anim
# If actor which should be displayed
adjust_actor_opacity
# Blink
adjust_blink
# If invisible
adjust_visibility
# If visible
if @battler_visible
# Escape
sprite_escape
# White flash
sprite_white_flash
# Animation
sprite_animation
# Damage
sprite_damage
# Collapse
sprite_collapse
end
# Set sprite coordinates
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
end
Changes my battler's coordinates, for example
self.x = @battler.screen_x - 100
moves all my battlers 100 pixels closer to the monsters. What I want to be able to do is
1. move one battler at a time, rather than all of them, based on actions.
2. animate them during these moves.
If these options become available, a solid Tactics system can be created with many possibilities including variable ranges, blast area effects, touch vs. ranged spells, backstabbing, and so forth.