XAS Battle System, changing Leader
#2
hmm im so not sure if this is going to work.

Code:
#------------------#
#Dod Change Leader #
#by:Dodoop #
#version:1.0 #
#------------------#
#
# Edited by: Night_Runner
# Date: 15/Sept/09
#
# Designed to: Turn on the switch corresponding with the leading player's ID
# (and turn off the switch from the last leading player). And update the
# leading player before battle (designed to be compatable with MOG XAS Hud
# V2.6.
#
#-----------------#
#Muda o líder quando uma certa tecla for pressionada no mapa.
module Dodoop
    #Tecla que devera ser pressiona para mudar o líder.
    CHANGE_LEADER_INPUT = Input::R
end
class Scene_Map
    alias change_leader update
    def update
    change_leader
   if Input.trigger?(Dodoop::CHANGE_LEADER_INPUT)
    leader_read
   end
    $game_switches[$game_party.actors[0].id] = true # Turns on the switch of
    # the leading hero
end

def leader_read
    $game_switches[$game_party.actors[0].id] = false # Turns off the switch of
    # the last hero
    @actors = []
   for i in 0...$game_party.actors.size
    @actors[i] = $game_party.actors[i]
   end
   for i in 1...@actors.size
    $game_party.actors[i - 1] = @actors[i]
   end
    $game_party.actors[@actors.size - 1] = @actors[0]
    $game_player.refresh
    $game_party.refresh # Needed to update the party order.
    @sthero.refresh # Only to be used with MOG's XAS, refreshes the HUD.
    @sthero.update if @sthero != nil
    @sthero.refresh if @sthero != nil
    @sthero.update if @sthero != nil
   if @sthero != nil
     @sthero.dispose
     @sthero = Window_HUD.new
     @sthero.x = XAS_HUD::XASHUD_X
     @sthero.y = XAS_HUD::XASHUD_Y
     if $game_switches[XAS_HUD::DISABLE_STATUS_HUD_SWITCH] == false
       @sthero.visible = true
     else
      @sthero.visible = false
     end
    @sthero.update
   end
end
end

#================================================#
# Game_Party
#================================================#

class Game_Party

def remove_actor(actor_id)
    # Delete actor
    @actors.delete($game_actors[actor_id])
    # Refresh player
    $game_player.refresh
    $game_switches[actor_id] = false # If the actor is removed, they cannot
    # be the leading hero.
end
end
Reply }


Messages In This Thread
XAS Battle System, changing Leader - by pez - 09-17-2009, 03:12 PM
XAS Battle System, changing Leader - by Legacy - 09-17-2009, 03:20 PM
XAS Battle System, changing Leader - by pez - 09-17-2009, 03:42 PM
XAS Battle System, changing Leader - by Legacy - 09-17-2009, 04:12 PM
XAS Battle System, changing Leader - by pez - 09-17-2009, 04:32 PM
XAS Battle System, changing Leader - by Legacy - 09-17-2009, 05:24 PM
XAS Battle System, changing Leader - by Legacy - 09-17-2009, 06:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   GW Animated Battle backs Patch for Atoa ACBS Solitaire 21 1,469 10-17-2024, 06:37 AM
Last Post: Solitaire
   ACBS - Atoa Custom Battle System and TP System zlsl 2 4,569 10-20-2021, 05:09 AM
Last Post: zlsl
   [RMXP] Showing skill gained by leveling up on battle result FrQise 12 12,656 05-07-2021, 02:05 PM
Last Post: FrQise
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,854 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   I want to add an Atoa Custom Battle System command cut-in. zlsl 11 13,897 11-11-2019, 08:55 PM
Last Post: DerVVulfman
   Question about ACBS (Atoa Custom Battle System) aeliath 10 12,768 08-08-2019, 02:50 PM
Last Post: aeliath
   YAMI Battle symphony + Holder add on (Loop casting anim) Starmage 0 4,254 03-01-2018, 09:03 AM
Last Post: Starmage
   (RMVXace) Battle error with Tankentai's battle system, help. x( Starmage 0 3,911 02-14-2018, 04:25 PM
Last Post: Starmage
   Atoa Individual Battle Commands Geminil 3 6,969 08-02-2017, 03:17 AM
Last Post: DerVVulfman
   Problems with counteraatack addon of Atoa Custom Battle System Djigit 22 35,469 01-05-2017, 08:05 PM
Last Post: Noctis



Users browsing this thread: 2 Guest(s)