- Joined
- Mar 13, 2014
- Messages
- 17
- Reaction score
- 1
- First Language
- English
- Primarily Uses
I would like to flip a single enemy around by using a script call or symphony tag during battle. I am not using a spriteset for enemies, only a single png image. I see that there is a method to mirror animations in Sprite_Base but it's a little beyond me on how to implement this for Sprite_Battler let alone reference it by specific Troop Index.
I am using Battle Symphony but the only way I can think of doing this is by creating poses for every enemy. I am hoping there is a simpler solution that I am just not seeing, maybe a symphony tag that already does this or a snippet somewhere that I just can't find.
Any help with this issue would be very much appreciated.
http://forums.rpgmakerweb.com/index.php?/topic/6037-battle-engine-symphony/
I am using Battle Symphony but the only way I can think of doing this is by creating poses for every enemy. I am hoping there is a simpler solution that I am just not seeing, maybe a symphony tag that already does this or a snippet somewhere that I just can't find.
Any help with this issue would be very much appreciated.
http://forums.rpgmakerweb.com/index.php?/topic/6037-battle-engine-symphony/
Code:
class Sprite_Base < Sprite #-------------------------------------------------------------------------- # * Start Animation #-------------------------------------------------------------------------- def start_animation(animation, mirror = false) dispose_animation @animation = animation if @animation @ani_mirror = mirror set_animation_rate @ani_duration = @animation.frame_max * @ani_rate + 1 load_animation_bitmap make_animation_sprites set_animation_origin end end #-------------------------------------------------------------------------- # * Set Animation Sprite # frame : Frame data (RPG::Animation::Frame) #-------------------------------------------------------------------------- def animation_set_sprites(frame) cell_data = frame.cell_data @ani_sprites.each_with_index do |sprite, i| next unless sprite pattern = cell_data[i, 0] if !pattern || pattern < 0 sprite.visible = false next end sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2 sprite.visible = true sprite.src_rect.set(pattern % 5 * 192, pattern % 100 / 5 * 192, 192, 192) if @ani_mirror sprite.x = @ani_ox - cell_data[i, 1] sprite.y = @ani_oy + cell_data[i, 2] sprite.angle = (360 - cell_data[i, 4]) sprite.mirror = (cell_data[i, 5] == 0) else sprite.x = @ani_ox + cell_data[i, 1] sprite.y = @ani_oy + cell_data[i, 2] sprite.angle = cell_data[i, 4] sprite.mirror = (cell_data[i, 5] == 1) end sprite.z = self.z + 300 + i sprite.ox = 96 sprite.oy = 96 sprite.zoom_x = cell_data[i, 3] / 100.0 sprite.zoom_y = cell_data[i, 3] / 100.0 sprite.opacity = cell_data[i, 6] * self.opacity / 255.0 sprite.blend_type = cell_data[i, 7] end end
Code:
class Sprite_Battler < Sprite_Base #-------------------------------------------------------------------------- # * Set New Animation #-------------------------------------------------------------------------- def setup_new_animation if @battler.animation_id > 0 animation = $data_animations[@battler.animation_id] mirror = @battler.animation_mirror start_animation(animation, mirror) @battler.animation_id = 0 end end

