Jump to content

Announcing our new website

To find out the latest about our new website, visit Game Dev Unlimited

Submitter

File Information

  • Submitted: Feb 22 2008 10:38 AM
  • Last Updated: Jun 07 2008 05:36 AM
  • File Size: 733.87K
  • Views: 6036
  • Downloads: 445

Download Attack Face Add-on to the main Battle System

- - - - -



Attack Face Add-on to the main Battle System
Version: 1.0
Type: Battle System Enhancement


Introduction

This script makes the battle scene show the characters whole body in a smooth slide in with a flash to add some chunky flavor of action to your battle system, I cant explain you'll have to download the demo =3


[spoiler="The Script"]#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Action Face Battle Animation
# Version: 1.0
# Type: Custom System
# Made by : Dark Dragon
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# ==================================================================
# Creat the window and animation methods..
# ===================================================================
class Window_BattelAttack < Window_Base
def initialize
super(0,0,600,450)
self.windowskin = Cache.system("Window")
self.opacity = 0
end
def fill_data(x,y,aa)
self.contents.font.name = "Arial"
self.contents.font.color = text_color(6)
self.contents.font.size = 30
self.contents.draw_text(x,y,400,32,aa)
self.contents.font.size = 18
end
def add_sprite(character)
@sprite = Sprite.new
@sprite.bitmap = Cache.face(character.name)
@sprite.opacity = 150
@sprite.x = -300
loop do
unless @sprite.x == 0
Graphics.wait(1)
@sprite.x +=20
else
break
end
end
# ===================================================================
# Weapon display
# ===================================================================
# If you want to remove the weapon display display all you have to do is remove this block
#and the other one in the "retreat_sprite method"
# ===================================================================
@sprite2 = Sprite.new
@sprite2.bitmap = Cache.face($data_weapons[character.weapon_id].name)
@sprite2.opacity = 150
@sprite2.x = 600
loop do
unless @sprite2.x == 100
Graphics.wait(1)
@sprite2.x -=20
else
break
end
end
# ===================================================================
end # Do not remove this line..

def retreat_sprite
loop do
unless @sprite.x == -300
Graphics.wait(1)
@sprite.x -=20
else
break
end
end

# ===================================================================
# Weapon Sprite Retreat
# ===================================================================
# If you removed the weapon display block above, then you should remove this one as well
# ===================================================================
loop do
unless @sprite2.x == 600
Graphics.wait(1)
@sprite2.x +=20
else
break
end
end
end
# ===================================================================
end # Do not remove this line..
# ==================================================================
# ==================================================================
# Edit of the Scene_Battle class, if you have any compability issues contact me through email
# ==================================================================
class Scene_Battle < Scene_Base
# Determine the flash animation ids through these two constants
FLASH_SCREEN_ID = 81
FLASH_TARGET_ID = 82
# ==================================================================
def start
super
$game_temp.in_battle = true
@spriteset = Spriteset_Battle.new
@message_window = Window_BattleMessage.new
@stats_window = Window_BattelAttack.new
@stats_window.visible = false
@action_battlers = []
create_info_viewport

end
def execute_action_attack
targets = @active_battler.action.make_targets
@stats_window.contents.clear
unless @active_battler.weapon_id == nil
screen_flash_animation(targets)
@stats_window.add_sprite(@active_battler)
@stats_window.fill_data(0,0,@active_battler.name)
@stats_window.fill_data(300,0, $data_weapons[@active_battler.weapon_id].name)
target_flash_animation(targets)
end
@stats_window.visible = true
wait(1)

text = sprintf(Vocab::DoAttack, @active_battler.name)
@message_window.add_instant_text(text)
display_attack_animation(targets)
wait(20)
for target in targets
target.attack_effect(@active_battler)
display_action_effects(target)
end
unless @active_battler.weapon_id == nil
@stats_window.retreat_sprite
end
@stats_window.contents.clear
end

def screen_flash_animation(targets)
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
else

aid1 = @active_battler.atk_animation_id
aid2 = @active_battler.atk_animation_id2
display_flash_screen_animation(targets, aid1, false)
display_flash_screen_animation(targets, aid2, true)
end
wait_for_animation
end

def target_flash_animation(targets)
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
else

aid1 = @active_battler.atk_animation_id
aid2 = @active_battler.atk_animation_id2
display_flash_target_animation(targets, aid1, false)
display_flash_target_animation(targets, aid2, true)
end
wait_for_animation
end
def display_flash_screen_animation(targets, animation_id, mirror = false)
animation = $data_animations[animation_id]
if animation != nil
to_screen = (animation.position == 3)
for target in targets.uniq
target.animation_id =FLASH_SCREEN_ID
target.animation_mirror = mirror
wait(20, true) unless to_screen
end
wait(20, true) if to_screen
end
end
def display_flash_target_animation(targets, animation_id, mirror = false)
animation = $data_animations[animation_id]
if animation != nil
to_screen = (animation.position == 3)
for target in targets.uniq
target.animation_id = FLASH_TARGET_ID
target.animation_mirror = mirror
wait(20, true) unless to_screen
end
wait(20, true) if to_screen
end
end
end
# ====================================================================
# Edit the Game_Enemy class so that it supports another attribute called weapon_id
# So that when the Scne_Battle checks on it it returns nil
# ====================================================================
class Game_Enemy < Game_Battler
attr_accessor :weapon_id
end
# ===================================================================[/spoiler]


Instructions

Post the script above main and under the Battle Scene..
Don't forget to make two animations one for the screen flash and one for the target flash
don't forget to add the battler sprite of all the battlers in the "Faces" folder with the same character name,
same goes for weapons..
Credits and Thanks

* Me =P


Author's Notes
My MSN : denarto0o0@hotmail.com
contact me if you need anything through that, this is probably my last thing with the RPG Maker series
I'm quitting and going for the Torque Game Engine now =3




I honestly don't like this at all. I hate the big weapons coming on screen. I was gonna say I hate the characters being over the monsters but then realized you just have to re-arrange the troops.
  • Report
The system could work... I can see uses for it in a different battle system. Maybe without the weapons tho.
  • Report
I like this allot! Can you please email me with the script for adding this to a special attack too? minus the weapon obviously.
  • Report
thanks 4 sharing...
  • Report

Other files you may be interested in ..





  • 179 Total Files
  • 47 Total Categories
  • 56 Total Authors
  • 103,076 Total Downloads
  • Chasing System Latest File
  • deathmoverz24 Latest Submitter

3 user(s) are online (in the past 30 minutes)

1 members, 2 guests, 0 anonymous users


draconus