[v 1.0.3] Train Actor

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

[v 1.0.3] Train Actor

Mensagem por Convidad em Dom 20 Fev - 10:26

Função: Mostra os outros personagens da equipe andando atras do personagem.

Instalação: Colocar acima de Main.

Recursos:

- Mostra ilimitados personagens em fila indiana

- Não causa bugs em troca de gráfico de um dos personagens

- Não causa bugs quando corre (Shift)

- Compatível com a maioria dos scripts para aumento da equipe

- Compatível com a maioria dos scripts de movimento em oito direções (diagonal)

- Compatível com alguns scripts de movimento por pixel

- Possue switch de desativação

- Mantem a posição quando salva e carrega o jogo

Script:

Spoiler for Hiden:
Código: [Selecionar]
################################################################################
################################################################################
####### T R A I N A C T O R ##################################################
################################################################################
############################ v 1.0.3 ###########################################
################################################### By: LB #####################
################## ReinoRPG.com ################################################
################################################################################

SWITCH = 1 # ID para desativar e ativar o script

PERSONAGENS = 3 # Não conta com o herói

class Game_Player < Game_Character
attr_accessor :party
alias initialize_edit initialize
def initialize
$game_switches[SWITCH] = true
@moves = []
@party = []
for i in 0...PERSONAGENS
@party[i] = Party.new
@party[i].set(i+1)
end
initialize_edit
end
alias moveto_edit moveto
def moveto(x, y)
moveto_edit(x, y)
for i in 0...PERSONAGENS
@party[i].moveto(x,y) if $scene.is_a?(Scene_Title)
end
@moves = []
end
def move(t)
for i in 0...PERSONAGENS
eval("@party[#{i}].move_#{@moves[i]}") if @moves[i] != nil
end
@moves[PERSONAGENS] = nil
@moves = [t]+@moves
end
def move_down(turn_ok = true)
super(turn_ok)
move("down") if !@move_failed
end
def move_left(turn_ok = true)
super(turn_ok)
move("left") if !@move_failed
end
def move_right(turn_ok = true)
super(turn_ok)
move("right") if !@move_failed
end
def move_up(turn_ok = true)
super(turn_ok)
move("up") if !@move_failed
end
def move_lower_left
super
move("lower_left") if !@move_failed
end
def move_lower_right
super
move("lower_right") if !@move_failed
end
def move_upper_left
super
move("upper_left") if !@move_failed
end
def move_upper_right
super
move("upper_right") if !@move_failed
end
alias update_edit update
def update
update_edit
for i in 0...PERSONAGENS
@party[i].update
end
end
end
class Party < Game_Character
def set(i)
@i = i
end
def update
super
if $game_party.members[@i] == nil or !$game_switches[SWITCH]
set_graphic("",0)
return
end
if $game_party.members[@i].character_name != @character_name or
$game_party.members[@i].character_index != @character_index
set_graphic($game_party.members[@i].character_name,$game_party.members[@i].character_index)
end
end
def dash?
return $game_player.dash?
end
def passable?(x,y)
return true
end
end
class Spriteset_Map
def create_characters
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
for vehicle in $game_map.vehicles
sprite = Sprite_Character.new(@viewport1, vehicle)
@character_sprites.push(sprite)
end
for i in 0...PERSONAGENS
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player.party[i]))
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
end
end



Scripts RGSS2 for RPG Maker VX by LB is licensed under a
Creative Commons Atribuição-Uso Não-Comercial-Compartilhamento pela mesma Licença 2.5 Brasil License.
Permissions beyond the scope of this license may be available at ReinoRPG.com
Denunciar ao Moderador Registrado

Convidad
Convidado


Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo


 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum