03-11-2007, 01:00 PM
Lead Actor Swapper
by Sheol
Versión: 1.01
Mar 11 2007
Introduction
SephirothTDS requested it (I think), so when you type R or L on map, it'll change the character of the player, like in Breath of Fire.
Version History
Version 1.01 (March 18, 07)
- Fixed: Little bug when using L
Script
Instructions
Paste the code above Main and below Game_Player.
Change the character with R and L.
Compatibility
Everything, i believe
by Sheol
Versión: 1.01
Mar 11 2007
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
No support is given. If you are the owner of the thread, please contact administration.
Introduction
SephirothTDS requested it (I think), so when you type R or L on map, it'll change the character of the player, like in Breath of Fire.
Version History
Version 1.01 (March 18, 07)
- Fixed: Little bug when using L
Script
Code:
#==============================================================
# ** Lead Actor Swapper
#------------------------------------------------------------------------------
# Slipknot (creationasylum.net)
# Version 1.01
# March 18, 2006
#==============================================================
class Game_System
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
attr_reader :lead_actor
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
alias slipknot_las_init initialize
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
slipknot_las_init
@lead_actor = 0
end
#--------------------------------------------------------------------------
# * Lead Actor
#--------------------------------------------------------------------------
def lead_actor=(n)
@lead_actor = n
$game_player.refresh
end
end
class Game_Player
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias slipknot_las_update update
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if $game_party.actors.size == 0
@character_name = ''
@character_hue = 0
return
end
actor = $game_party.actors[$game_system.lead_actor]
@character_name = actor.character_name
@character_hue = actor.character_hue
@opacity = 255
@blend_type = 0
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
slipknot_las_update
if Input.trigger?(Input::R)
$game_system.lead_actor = ($game_system.lead_actor + 1) % $game_party.actors.size
end
if Input.trigger?(Input::L)
$game_system.lead_actor = ($game_system.lead_actor - 1) % $game_party.actors.size
end
end
end
Instructions
Paste the code above Main and below Game_Player.
Change the character with R and L.
Compatibility
Everything, i believe