def remove_battler(id, anim = 0, type = "enemy")
case type
when "enemy"
actor = nil
for e in $game_system.tactics_enemies
if e.id == id
actor = e
break
end
end
if actor != nil
if anim != 0
actor.animation_id = anim
wait_count = $data_animations[anim].frame_max rescue wait_count = 1
loop do
@spriteset.update
$game_screen.update
actor.update
wait_count -= 1
break if wait_count == 0
end
end
$game_system.tactics_enemies.delete(actor)
for sprite in @spriteset.battler_sprites
if sprite.bat == actor
sprite.dispose
@spriteset.battler_sprites.delete(sprite)
end
end
end
when "neutrual"
actor = nil
for e in $game_system.tactics_neutral
if e.id == id
actor = e
break
end
end
if actor != nil
if anim != 0
actor.animation_id = anim
wait_count = $data_animations[anim].frame_max rescue wait_count = 1
loop do
@spriteset.update
$game_screen.update
actor.update
wait_count -= 1
break if wait_count == 0
end
end
$game_system.tactics_enemies.delete(actor)
for sprite in @spriteset.battler_sprites
if sprite.bat == actor
sprite.dispose
@spriteset.battler_sprites.delete(sprite)
end
end
end
when "actor"
actor = nil
for e in $game_system.tactics_actors
if e.id == id
actor = e
break
end
end
if actor != nil
if anim != 0
actor.animation_id = anim
wait_count = $data_animations[anim].frame_max rescue wait_count = 1
loop do
@spriteset.update
$game_screen.update
actor.update
wait_count -= 1
break if wait_count == 0
end
end
$game_system.tactics_enemies.delete(actor)
for sprite in @spriteset.battler_sprites
if sprite.bat == actor
sprite.dispose
@spriteset.battler_sprites.delete(sprite)
end
end
end
end
end
You will have to call this via event or troop_event. You do it similar to adding characters to battle but slightly different.
$scene.remove_battler(Battler_ID, Animation_ID, Battler_Type)
where Battler_ID is the ID of the battler in the database. You must be specific to exactly their id. Including neutrals, they must be the 51 instead of 1.
Animation_ID is the animation you would like to play on the actor/neutral/enemy before they "disappear" from battle (they will litterally disappear, default is no animation)
Battler_Type is the type of battler. ("actor"/"neutral"/"enemy") (it defaults to enemy) that you want to remove.
so $scene.remove_battler(1,1,"actor") would remove actor1(aluxes) from the battle, right after animation_id 1 is played.
This script MUST be added to scene_Battle_TBS somewhere before the very last end. I put it right next to set_character, cause they kinda follow suit.