O TEMA DO FÓRUM ESTÁ EM MANUTENÇÃO. FEEDBACKS AQUI: ACESSAR

[Sistema] Criando um jogo de plataforma (1/5)

Iniciado por MayLeone, 01/12/2012 às 11:18



Video de testes, de um jogo de plataforma no Rpg maker (feito por mim):



Criadora/ Idealizadora: MayLeone.
Dificuldade:     (médio)
Engine: Rpg Maker XP.
Necessita-se saber: Progamação de eventos.
Tutorial divido em cinco partes e uma extra: Introdução e recursos - Parte gráfica - Estrutura - Configurações e midis.
O tutorial é baseado no jogo da Sega Genesis: Decap Attack.
Não postar esse tutorial em outros lugares, sem minha permissão!


[box class=titlebg]Criando seu jogo de plataforma p1 (Recursos e Introdução)[/box]
[box class=catbg3]  :ideia: Há um certo tempo atrás, eu comecei a desenvolver um jogo estilo plataforma no Rpg Maker, jogo cujo nome era Jurassic Age.
Durante todo esse tempo em que estudei maneiras de criar um jogo perfeito desse estilo, eu consegui aprender bastante coisas nesse tipo de criação de jogo.
Com o cancelamento temporário do projeto citado em questão, eu decidi criar este tópico aqui na CRM, ensinando tudo o que eu aprendi sobre a criação de jogos de plataforma no RM, e é com muita paciência, dedicação e carinho, que eu irei explicar para vocês, como criar um jogo que simula perfeitamente um jogo de plataforma nessa engine.
Eu estava postando o conteúdo primeiramente em meu blogger sobre RM: http://rmxpbdl.blogspot.com/2011/07/como-criar-um-jogo-de-plataforma-parte.html
Mas, decidi postar por aqui também, para que mais pessoas possam visualizar os tutorias, e conhecer outros meios de criar novos estilos de jogos.  [/box]



[box class=titlebg]
Informações:
[/box]
[box class=catbg3]Tutorial e sprites criados por MayLeone.
Você precisa conhecer um pouco sobre os jogos de plataforma, ter uma noção sobre sua jogabilidade.
Ter um pequeno conhecimento sobre a engine, suas funções, como aplicar scripts, saber os jargões e etc...
O nível de dificuldade desse tutorial pode variar, pois há vários sistemas/scripts/mapeamentos um tanto fáceis, como também complexos, porém tudo será explicado com detalhes e calma, basta prestar atenção.[/box]

[box class=titlebg]
Início:
[/box]
[box class=catbg3]Muitos vão me dizer que existem engines de criadores de jogos como o Indie Game Maker e Game Maker, para criar esse tipo de jogo, eu mesma já consegui fazer algumas coisas neles, mas os mesmos podem parecer um pouco complexos de início, e tudo o que ambos podem fazer, o Rpg Maker também pode, é só saber como, e ter os recursos certos.

Por falar em recursos, vamos falar um pouco deles.
Como todos sabem, a engine RMXP, foi criada para que seus usuários possam criar jogos do gênero RPG.
O personagem pode andar pelo mapa nas quatro direções (esquerda, direita, cima e baixo), e a  perspectiva dos mapas são olhados de cima, assim:

(a imagem acima não foi mapeada por mim, ela serviu apenas de exemplo)

E como nos jogos de plataforma, que na maioria das vezes são em 2D (o personagem só anda na horizontal e pula) o Rpg Maker, de início não parece ser uma boa engine para criar esse tipo de jogo, pois o personagem pode se movimentar em todas as direções e o sistema de pulo que vem com ele é uma porcaria (para esse tipo de jogo).
Mas, como existem pessoas que querem ir mais além, vulgo, alguns scripters (em especial Sweet Liar e meu amigo Gab) eles puderam trazer para a humanidade maker, alguns scripts que ajudam o Rpg Maker a simular um jogo de plataforma perfeitamente.
Eu juntei vários scripts que podem criar um jogo de plataforma no RMXP, e trago especialmente para vocês.[/box]

[box class=titlebg]
Recursos básicos/scripts:
[/box]
[box class=catbg3]• Script de simulador de plataforma:
Spoiler
[box class=errorbox2]Pulo perfeito, por pixels ( fazendo assim o personagem não parecer que está flutuando na tela, e sim pulando) modificável por você mesmo (como velocidade da queda e altura dos pulos), sistema de gravidade (ex: personagem não está em alguma plataforma, então ele cai até chegar em alguma) e muitas outras funções. Se você não é um scripter experiente recomendo que não altere nada no script. Única coisa que poderá ser alterada será a linha 23 no script, onde você altera a altura do pulo (quanto maior o número menor a altura do pulo. Eu recomendo deixar 2)
A linha vai estar assim:
Citar@gravity = 2
Então apague o ''2'' e coloque um número de 1 à 4 que quiser, mas é como eu disse, quanto maior o número menor o salto.
Créditos do script: Sweet Liar  por adaptar e Gab por modificar.
[close]
[/box]

[box class=catbg3]
• Script com menu de opções (simples):
Spoiler
[box class=errorbox2]Com três opções: Aumentar/Abaixar o som das BGM e BGS, e a opção de Full screen. As instruções de como usar corretamente o script encontra-se no mesmo.
Créditos do script: Gab por criar especialmente para mim.
[close]
[/box]

[box class=catbg3]• Script de Pontos:
Spoiler
[box class=errorbox2]Na verdade não seriam pontos, na verdade a ideia inicial do script era fazer com que mostrasse no mapa a quantidade de Dinheiro (G) que o personagem possuí, mas como nos jogos de plataforma, na maioria das vezes, temos um contador de pontos (ex: matou um inimigo, então ganha-se 450 pontos e o contador mostra) esse script é perfeito para isso. Então ao invés de chamarmos de dinheiro, chamamos de pontos.
As modificações no script são simples, apenas coloque as coordenadas X e Y da janela que mostra dinheiro pontos (posição da janela), a opacidade da janela (recomendo que deixe 0, fica mais bonito) e a switch que mostra ou esconde essa janela.
Tudo poderá ser modificado da linha 11 à linha 13 no script.
Créditos do script: Madajuv por criar o script.
[close]
[/box]

[box class=catbg3]• Script de Hud(vidas):
Spoiler
[box class=errorbox2]Esse script é bem útil para que o personagem tenha sua barra de vidas no mapa.
Você pode fazer as modificações como por exemplo, a imagem que será a vida do seu personagem (pode ser um coração, uma estrela, uma bolinha, o que você quiser...) Contanto que seu nome seja ''HP Bar BH''. (sem aspas)
No script tem todas as informações de como modifica-lo.
Sua vida será representada pelo Hp do seu herói, então se algum inimigo vier te atacar, o inimigo irá tirar uma certa quantia de Hp do personagem (a quantia que você quiser).
Créditos do script: WWEBR por criar e Gab por modificar algumas coisas.
[close]
[/box]

[box class=catbg3]• Script de Pauser:
Spoiler
[box class=errorbox2]Como muitos sabem, quase todo jogo tem sua tela de pausa, onde o player aperta determinado botão e uma tela pausando (parando) o jogo aparece.
Não vou entrar em maior detalhes, acho que todos sabem para que uma pauser serve.
Creditos do script: TRCS19 por criar o mesmo e ao Gab por modificar/organizar ele.
[close]
[/box]

[box class=catbg3]• Anti-Lag eficaz:
Spoiler
[box class=errorbox2]Bom anti-lag, para que seu projeto não fique lerdo/travando, em outras palavras com lag.
Não há o que modificar no script, apenas coloque-o acima do main (assim como todos os outros) e pronto.
Creditos: Near Fantastica por criar o anti-lag e Gab por organizar.
[close]
[/box]

[box class=catbg3]• Script de Plataforma em movimento:
Spoiler
[box class=errorbox2]Script criado especialmente para mim, pelo Gab, para adaptar-se ao script de plataforma do Sweet Liar.
Esse script faz com que determinado evento (uma plataforma) leve o personagem conforme suas direções.(ex: personagem está em cima desse evento, e o evento esta com a rota para ir da esquerda para direita, então se o player ficar acima da mesma ele será movimentado junto da plataforma para esquerda e direita).
Esse sistema é bem comum nos jogos de plataforma, por isso resolvi pedir para que o Gab o criasse.
Creditos: Gab por criar o script.
[close]
[/box]

[box class=catbg3]• Script de eventos atravessarem tudo:
Spoiler
[box class=errorbox2]Script útil e também criado especialmente para mim, para que determinado evento no mapa possa atravessar tiles bloqueados.
Eu sei, era só colocar invisibilidade on no mover evento, mas o script de plataforma do Sweet Liar, bloqueia esse comando, por isso o script.
Creditos: Gab por criar o script.
[close]
[/box]

[box class=catbg3]• Script de Check-point:
Spoiler
[box class=errorbox2]O personagem morreu? não se preocupe, o check-point irá te fazer começar o jogo da onde você parou. (outro script criado para mim)
Maiores informações de como usar o script no próprio.
Creditos: Gab por criar.
[close]
[/box]

[box class=catbg3]• Script de colisão entre eventos:
Spoiler
[box class=errorbox2]Esse script será bastante útil para um bom jogo de plataforma, ele faz com que uma opção ''ao tocar evento'' possa ser feita com outro evento.
Esse script substitui o cansativo trabalho de ativar certas coisas por coordenadas de variáveis com outros eventos.
Creditos: JoãoNeto por criar e Gab por modificar.
[close]
[/box]

[box class=catbg3]
Link para download dos scripts citados: (4shared)
[/box]

[box class=titlebg]
Finalização:
[/box]
[box class=catbg3]Ótimo! agora temos os scripts necessários para criar um bom jogo de plataforma.
Agora seu personagem pula, quando aperta-se a tecla ''S'' (se você não modificou o script,claro) e pausa apertando a tecla D.
Mas esse não é nem a ponta do iceberg. Claro que com os scripts em mãos, tudo se torna mais fácil, mas ainda faltam as imagens, midis, sistemas, sprites, mapas e uns básicos tutoriais criados por mim para facilitar ainda mais a coisa.
Porém, vamos por partes. Podemos ir agora para a parte gráfica do seu jogo, onde tudo começará, iremos mexer no database, criar sprites, e diversas outras coisas...
Segue nosso tutorial na parte 2.
Nos vemos lá.
Qualquer dúvida, com essa parte do tutorial, entre em contato.[/box]



Eu sinto muito estar ressuscitando um tópico tão antigo, mas eu realmente preciso desses scripts May. Você poderia consertar o link?

O link do 4shared para o download dos scripts está válido, o único link do tópico que está invalido é o do blogger dela que provavelmente ela deve ter mudado de nome.

Citação de: mercia online 29/03/2014 às 15:10
O link do 4shared para o download dos scripts está válido, o único link do tópico que está invalido é o do blogger dela que provavelmente ela deve ter mudado de nome.

Está não :c Clique em "download" para você ver ...
Tudo vai dar certo (y(8.

Citação de: katumblo online 29/03/2014 às 15:47
Citação de: mercia online 29/03/2014 às 15:10
O link do 4shared para o download dos scripts está válido, o único link do tópico que está invalido é o do blogger dela que provavelmente ela deve ter mudado de nome.

Está não :c Clique em "download" para você ver ...

O link de download está on!

Citação de: Lima online 30/03/2014 às 12:44
Citação de: katumblo online 29/03/2014 às 15:47
Citação de: mercia online 29/03/2014 às 15:10
O link do 4shared para o download dos scripts está válido, o único link do tópico que está invalido é o do blogger dela que provavelmente ela deve ter mudado de nome.

Está não :c Clique em "download" para você ver ...

O link de download está on!

Tenta ir até o final, quando você clica em download ele vai para uma página que diz claramente "The file link that you requested is not valid".

ahhh normalmente aparece logo se dá ou não, peço desculpa!


Deve ser este aqui, porém eu acho que não está modificado como no tópico(ou até talvez eu modifiquei algo, sei lá e.e), pois tenho este script faz tempo, e nunca usei.
#======================================#
#
#
# Platform System 2.001
#  Sweet Liar Adaption
#
#
#
#======================================#

class Game_Character
  attr_reader   :xv                       # Tr?c x
  attr_reader   :yv                       # Tr?c y
  attr_accessor :gravity                  # Ð? cao
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias pms_initialize initialize
  def initialize
    pms_initialize
    @xv = 0
    @yv = 0
    @move_count = 0
    @gravity = 4
    @jump_flag = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Moving
  #--------------------------------------------------------------------------
  def moving?
    # If logical coordinates differ from real coordinates,
    # movement is occurring.
    return @move_count > 0
  end
  #--------------------------------------------------------------------------
  # * Tocch
  #     mode :
  #     * 0 : Left or Right
  #     * 1 : Up or Down
  #--------------------------------------------------------------------------
  def touch?(mode = 0)
    if mode == 0
      if @xv > 0
        check_event_trigger_touch(@x+1, @y)
      else
        check_event_trigger_touch(@x-1, @y)
      end
    else
      if @xv > 0
        check_event_trigger_touch(@x, @y+1)
      else
        check_event_trigger_touch(@x, @y-1)
      end
    end
  end
  def distance_x_from_player
    sx = @x - $game_player.x
    return sx
  end
  def passable?(mode = 0)
    left_x = @real_x + 32 >> 7    # 4 << 3
    right_x = @real_x + 110 >> 7  # 28 << 3
    up_y = @real_y + 16>> 7      # 2 << 3
    down_y = @real_y + 110 >> 7   # 28 << 3
    # Get new coordinates
    if mode == 0
      if @xv > 0
        return false unless $game_map.passable?(right_x, up_y,6)
        return false unless $game_map.passable?(right_x, down_y,6)
      else
        return false unless $game_map.passable?(left_x, up_y,4)
        return false unless $game_map.passable?(left_x, down_y,4)
      end
    else
      if @yv > 0
        return false unless $game_map.passable?(left_x, down_y,2)
        return false unless $game_map.passable?(right_x, down_y,2)
      else
        return false unless $game_map.passable?(left_x, up_y,8)
        return false unless $game_map.passable?(right_x, up_y,8)
      end
    end
   
    return true if @through
    # Loop all events
    for event in $game_map.events.values
      new_x = (event.direction == 6 ? ((@real_x + 32 >> 7) + 1) : event.direction == 4 ? ((@real_x + 110 >> 7) + 1) : 0)
      new_y = (event.direction == 2 ? ((@real_y + 16 >> 7) + 1) : event.direction == 8 ? ((@real_y + 110 >> 7) + 1) : 0)
      # If event coordinates are consistent with move destination
      if event.x == new_x and event.y == new_y
        # If through is OFF
        unless event.through
          # If self is event
          if self != $game_player
            # impassable
            return false
          end
          # With self as the player and partner graphic as character
          if event.character_name != ""
            # impassable
            return false
          end
        end
      end
    end
   
    new1_x = ($game_player.direction == 6 ? ((@real_x + 32 >> 7) + 1) : $game_player.direction == 4 ? ((@real_x + 110 >> 7) + 1) : 0)
    new1_y = ($game_player.direction == 2 ? ((@real_y + 16 >> 7) + 1) : $game_player.direction == 8 ? ((@real_y + 110 >> 7) + 1) : 0)
     
    if $game_player.x == new1_x and $game_player.y == new1_y
      # If through is OFF
      unless $game_player.through
        # If your own graphic is the character
        if @character_name != ""
          # impassable
          return false
        end
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_x
    update_y
    # Branch with jumping, moving, and stopping
    if jumping?
      update_jump
    elsif moving?
      @move_count -= 1
      if @walk_anime
        @anime_count += 1.5
      elsif @step_anime
        @anime_count += 1
      end
    else
      update_stop
    end
    # If animation count exceeds maximum value
    # * Maximum value is move speed * 1 taken from basic value 18
    if @anime_count > 18 - @move_speed * 2
      # If stop animation is OFF when stopping
      if not @step_anime and @stop_count > 0
        # Return to original pattern
        @pattern = @original_pattern
      # If stop animation is ON when moving
      else
        # Update pattern
        @pattern = (@pattern + 1) % 4
      end
      # Clear animation count
      @anime_count = 0
    end
    # If waiting
    if @wait_count > 0
      # Reduce wait count
      @wait_count -= 1
      return
    end
    # If move route is forced
    if @move_route_forcing
      # Custom move
      move_type_custom
      return
    end
    # When waiting for event execution or locked
    if @starting or lock?
      # Not moving by self
      return
    end
    # If stop count exceeds a certain value (computed from move frequency)
    if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
      # Branch by move type
      case @move_type
      when 1  # Random
        move_type_random
      when 2  # Approach
        move_type_toward_player
      when 3  # Custom
        move_type_custom
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? Update X
  #--------------------------------------------------------------------------
  def update_x
    if !@jump_flag && !moving?
      @xv = 0
      return
    end
    last_x = @real_x
    @real_x += @xv
    @x = @real_x >> 7
    unless passable?(0)
      @real_x = last_x
      @x = @real_x >> 7
      @xv = 0
      touch?(0)
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Y
  #--------------------------------------------------------------------------
  def update_y
    if  @gravity > 0
      @yv += @gravity
      @yv = 64 if @yv > 64
    elsif !moving?
      @yv = 0
      return
    end
    last_y = @real_y
    @real_y += @yv
    @y = @real_y >> 7
    unless passable?(1)
      @real_y = last_y
      @y = @real_y >> 7
      @jump_flag = false if @yv > 0
      @yv = 0
      touch?(1)
    end
  end
  #--------------------------------------------------------------------------
  # * Move Down
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_down(turn_enabled = true)
    @stop_count = 0
    d = 2 ** @move_speed
    @yv = d
    @move_count = 128 / d
  end
  #--------------------------------------------------------------------------
  # * Move Left
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_left(turn_enabled = true)
    turn_left
    d = 2 ** @move_speed
    @xv = 0 - d
    @move_count = 128 / d
    increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Right
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_right(turn_enabled = true)
    turn_right
    d = 2 ** @move_speed
    @xv = d
    @move_count = 128 / d
    increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move up
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_up(turn_enabled = true)
    @stop_count = 0
    d = 2 ** @move_speed
    @yv = 0 - d
    @move_count = 128 / d
  end
  #--------------------------------------------------------------------------
  # * Move Lower Left
  #--------------------------------------------------------------------------
  def move_lower_left
    # If no direction fix
    unless @direction_fix
      # Face down is facing right or up
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    end
      # Update coordinates
      d = 2 ** @move_speed
      @xv = 0 - d
      @yv = d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Lower Right
  #--------------------------------------------------------------------------
  def move_lower_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face down if facing up
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    end
      d = 2 ** @move_speed
      @xv = d
      @yv = d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Upper Left
  #--------------------------------------------------------------------------
  def move_upper_left
    # If no direction fix
    unless @direction_fix
      # Face left if facing right, and face up if facing down
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    end
      # Update coordinates
      d = 2 ** @move_speed
      @xv = 0 - d
      @yv = 0 - d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Upper Right
  #--------------------------------------------------------------------------
  def move_upper_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face up if facing down
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    end
      d = 2 ** @move_speed
      @xv = d
      @yv = 0 - d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move at Random
  #--------------------------------------------------------------------------
  def move_random
    case rand(@gravity == 0 ? 4 : 2)
    when 0;  move_left(false)
    when 1;  move_right(false)
    when 2;  move_up(false)
    when 3;  move_down(false)
    end
  end
  #--------------------------------------------------------------------------
  # * Move toward Player
  #--------------------------------------------------------------------------
  def move_toward_player
    sx = distance_x_from_player
    sx > 0 ? move_left : move_right
  end
  #--------------------------------------------------------------------------
  # * Move away from Player
  #--------------------------------------------------------------------------
  def move_away_from_player
    sx = distance_x_from_player
    sx > 0 ? move_right : move_left
  end
  #--------------------------------------------------------------------------
  # * Jump
  #  Không c?n nh?p giá tr? x và y ? RMXP
  #--------------------------------------------------------------------------
  def jump(x_plus, y_plus)
    return if @jump_flag
    @yv = -48
    @jump_flag = true
    @stop_count = 0
  end
  #--------------------------------------------------------------------------
  # * Turn Towards Player
  #--------------------------------------------------------------------------
  def turn_toward_player
    if @real_x < $game_player.real_x
      turn_right
    else
      turn_left
    end
  end
end
 
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Passable Determinants
  #--------------------------------------------------------------------------
  def passable?(mode)
    super(mode)
  end
 
  def move_left(turn_ok = true)
    turn_left
    max_speed = -20
    @xv = [@xv + 2, max_speed].min if @xv < max_speed and !@jump_flag
    @xv = [@xv - 2, max_speed].max if @xv > max_speed
    @move_count = 1
  end
 
  def move_right(turn_ok = true)
    turn_right
    max_speed = 20
    @xv = [@xv + 2, max_speed].min if @xv < max_speed
    @xv = [@xv - 2, max_speed].max if @xv > max_speed and !@jump_flag
    @move_count = 1
  end
 
  def update_x
    if !@jump_flag && !moving?
      @xv = [@xv + 2, 0].min if @xv < 0
      @xv = [@xv - 2, 0].max if @xv > 0
    end
    last_x = @real_x
    @real_x += @xv
    @x = @real_x >> 7
    unless passable?(0)
      @real_x = last_x
      @x = @real_x >> 7
      @xv = 0
      touch?(0)
    end
  end
  def move_jump(yv)
    @yv = yv
    @jump_flag = true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Remember whether or not moving in local variables
    last_moving = moving?
    # If moving, event running, move route forcing, and message window
    # display are all not occurring
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      # Move player in the direction the directional button is being pressed
      if Input.press?(Input::LEFT)
        move_left
      elsif Input.press?(Input::RIGHT)
        move_right
      end
    end
    if Input.trigger?(Input::Y) && @jump_flag == false    # Jump
      move_jump(-50)
    end
    # Remember coordinates in local variables
    last_real_x = @real_x
    last_real_y = @real_y
    super
    # If character moves down and is positioned lower than the center
    # of the screen
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      # Scroll map down
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # If character moves left and is positioned more let on-screen than
    # center
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # Scroll map left
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # If character moves right and is positioned more right on-screen than
    # center
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # Scroll map right
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # If character moves up and is positioned higher than the center
    # of the screen
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      # Scroll map up
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # If not moving
    unless moving?
      # If player was moving last time
      if last_moving
        # Event determinant is via touch of same position event
        result = check_event_trigger_here([1,2])
        # If event which started does not exist
        if result == false
          # Disregard if debug mode is ON and ctrl key was pressed
          unless $DEBUG and Input.press?(Input::CTRL)
            # Encounter countdown
            if @encounter_count > 0
              @encounter_count -= 1
            end
          end
        end
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Same position and front event determinant
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end
    end
  end
end
 
class Game_Event < Game_Character
  def get_name
    return @event.name
  end
end
  

Citação de: Lima online 30/03/2014 às 13:49
ahhh normalmente aparece logo se dá ou não, peço desculpa!

Eu fui super feliz pra tentar baixar e deu isso...

Citação de: felipefalcon online 30/03/2014 às 14:48

Deve ser este aqui, porém eu acho que não está modificado como no tópico(ou até talvez eu modifiquei algo, sei lá e.e), pois tenho este script faz tempo, e nunca usei.
#======================================#
#
#
# Platform System 2.001
#  Sweet Liar Adaption
#
#
#
#======================================#

class Game_Character
  attr_reader   :xv                       # Tr?c x
  attr_reader   :yv                       # Tr?c y
  attr_accessor :gravity                  # Ð? cao
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias pms_initialize initialize
  def initialize
    pms_initialize
    @xv = 0
    @yv = 0
    @move_count = 0
    @gravity = 4
    @jump_flag = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Moving
  #--------------------------------------------------------------------------
  def moving?
    # If logical coordinates differ from real coordinates,
    # movement is occurring.
    return @move_count > 0
  end
  #--------------------------------------------------------------------------
  # * Tocch
  #     mode :
  #     * 0 : Left or Right
  #     * 1 : Up or Down
  #--------------------------------------------------------------------------
  def touch?(mode = 0)
    if mode == 0
      if @xv > 0
        check_event_trigger_touch(@x+1, @y)
      else
        check_event_trigger_touch(@x-1, @y)
      end
    else
      if @xv > 0
        check_event_trigger_touch(@x, @y+1)
      else
        check_event_trigger_touch(@x, @y-1)
      end
    end
  end
  def distance_x_from_player
    sx = @x - $game_player.x
    return sx
  end
  def passable?(mode = 0)
    left_x = @real_x + 32 >> 7    # 4 << 3
    right_x = @real_x + 110 >> 7  # 28 << 3
    up_y = @real_y + 16>> 7      # 2 << 3
    down_y = @real_y + 110 >> 7   # 28 << 3
    # Get new coordinates
    if mode == 0
      if @xv > 0
        return false unless $game_map.passable?(right_x, up_y,6)
        return false unless $game_map.passable?(right_x, down_y,6)
      else
        return false unless $game_map.passable?(left_x, up_y,4)
        return false unless $game_map.passable?(left_x, down_y,4)
      end
    else
      if @yv > 0
        return false unless $game_map.passable?(left_x, down_y,2)
        return false unless $game_map.passable?(right_x, down_y,2)
      else
        return false unless $game_map.passable?(left_x, up_y,8)
        return false unless $game_map.passable?(right_x, up_y,8)
      end
    end
   
    return true if @through
    # Loop all events
    for event in $game_map.events.values
      new_x = (event.direction == 6 ? ((@real_x + 32 >> 7) + 1) : event.direction == 4 ? ((@real_x + 110 >> 7) + 1) : 0)
      new_y = (event.direction == 2 ? ((@real_y + 16 >> 7) + 1) : event.direction == 8 ? ((@real_y + 110 >> 7) + 1) : 0)
      # If event coordinates are consistent with move destination
      if event.x == new_x and event.y == new_y
        # If through is OFF
        unless event.through
          # If self is event
          if self != $game_player
            # impassable
            return false
          end
          # With self as the player and partner graphic as character
          if event.character_name != ""
            # impassable
            return false
          end
        end
      end
    end
   
    new1_x = ($game_player.direction == 6 ? ((@real_x + 32 >> 7) + 1) : $game_player.direction == 4 ? ((@real_x + 110 >> 7) + 1) : 0)
    new1_y = ($game_player.direction == 2 ? ((@real_y + 16 >> 7) + 1) : $game_player.direction == 8 ? ((@real_y + 110 >> 7) + 1) : 0)
     
    if $game_player.x == new1_x and $game_player.y == new1_y
      # If through is OFF
      unless $game_player.through
        # If your own graphic is the character
        if @character_name != ""
          # impassable
          return false
        end
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_x
    update_y
    # Branch with jumping, moving, and stopping
    if jumping?
      update_jump
    elsif moving?
      @move_count -= 1
      if @walk_anime
        @anime_count += 1.5
      elsif @step_anime
        @anime_count += 1
      end
    else
      update_stop
    end
    # If animation count exceeds maximum value
    # * Maximum value is move speed * 1 taken from basic value 18
    if @anime_count > 18 - @move_speed * 2
      # If stop animation is OFF when stopping
      if not @step_anime and @stop_count > 0
        # Return to original pattern
        @pattern = @original_pattern
      # If stop animation is ON when moving
      else
        # Update pattern
        @pattern = (@pattern + 1) % 4
      end
      # Clear animation count
      @anime_count = 0
    end
    # If waiting
    if @wait_count > 0
      # Reduce wait count
      @wait_count -= 1
      return
    end
    # If move route is forced
    if @move_route_forcing
      # Custom move
      move_type_custom
      return
    end
    # When waiting for event execution or locked
    if @starting or lock?
      # Not moving by self
      return
    end
    # If stop count exceeds a certain value (computed from move frequency)
    if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
      # Branch by move type
      case @move_type
      when 1  # Random
        move_type_random
      when 2  # Approach
        move_type_toward_player
      when 3  # Custom
        move_type_custom
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? Update X
  #--------------------------------------------------------------------------
  def update_x
    if !@jump_flag && !moving?
      @xv = 0
      return
    end
    last_x = @real_x
    @real_x += @xv
    @x = @real_x >> 7
    unless passable?(0)
      @real_x = last_x
      @x = @real_x >> 7
      @xv = 0
      touch?(0)
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Y
  #--------------------------------------------------------------------------
  def update_y
    if  @gravity > 0
      @yv += @gravity
      @yv = 64 if @yv > 64
    elsif !moving?
      @yv = 0
      return
    end
    last_y = @real_y
    @real_y += @yv
    @y = @real_y >> 7
    unless passable?(1)
      @real_y = last_y
      @y = @real_y >> 7
      @jump_flag = false if @yv > 0
      @yv = 0
      touch?(1)
    end
  end
  #--------------------------------------------------------------------------
  # * Move Down
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_down(turn_enabled = true)
    @stop_count = 0
    d = 2 ** @move_speed
    @yv = d
    @move_count = 128 / d
  end
  #--------------------------------------------------------------------------
  # * Move Left
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_left(turn_enabled = true)
    turn_left
    d = 2 ** @move_speed
    @xv = 0 - d
    @move_count = 128 / d
    increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Right
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_right(turn_enabled = true)
    turn_right
    d = 2 ** @move_speed
    @xv = d
    @move_count = 128 / d
    increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move up
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_up(turn_enabled = true)
    @stop_count = 0
    d = 2 ** @move_speed
    @yv = 0 - d
    @move_count = 128 / d
  end
  #--------------------------------------------------------------------------
  # * Move Lower Left
  #--------------------------------------------------------------------------
  def move_lower_left
    # If no direction fix
    unless @direction_fix
      # Face down is facing right or up
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    end
      # Update coordinates
      d = 2 ** @move_speed
      @xv = 0 - d
      @yv = d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Lower Right
  #--------------------------------------------------------------------------
  def move_lower_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face down if facing up
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    end
      d = 2 ** @move_speed
      @xv = d
      @yv = d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Upper Left
  #--------------------------------------------------------------------------
  def move_upper_left
    # If no direction fix
    unless @direction_fix
      # Face left if facing right, and face up if facing down
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    end
      # Update coordinates
      d = 2 ** @move_speed
      @xv = 0 - d
      @yv = 0 - d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move Upper Right
  #--------------------------------------------------------------------------
  def move_upper_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face up if facing down
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    end
      d = 2 ** @move_speed
      @xv = d
      @yv = 0 - d
      @move_count = 128 / d
      # Increase steps
      increase_steps
  end
  #--------------------------------------------------------------------------
  # * Move at Random
  #--------------------------------------------------------------------------
  def move_random
    case rand(@gravity == 0 ? 4 : 2)
    when 0;  move_left(false)
    when 1;  move_right(false)
    when 2;  move_up(false)
    when 3;  move_down(false)
    end
  end
  #--------------------------------------------------------------------------
  # * Move toward Player
  #--------------------------------------------------------------------------
  def move_toward_player
    sx = distance_x_from_player
    sx > 0 ? move_left : move_right
  end
  #--------------------------------------------------------------------------
  # * Move away from Player
  #--------------------------------------------------------------------------
  def move_away_from_player
    sx = distance_x_from_player
    sx > 0 ? move_right : move_left
  end
  #--------------------------------------------------------------------------
  # * Jump
  #  Không c?n nh?p giá tr? x và y ? RMXP
  #--------------------------------------------------------------------------
  def jump(x_plus, y_plus)
    return if @jump_flag
    @yv = -48
    @jump_flag = true
    @stop_count = 0
  end
  #--------------------------------------------------------------------------
  # * Turn Towards Player
  #--------------------------------------------------------------------------
  def turn_toward_player
    if @real_x < $game_player.real_x
      turn_right
    else
      turn_left
    end
  end
end
 
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Passable Determinants
  #--------------------------------------------------------------------------
  def passable?(mode)
    super(mode)
  end
 
  def move_left(turn_ok = true)
    turn_left
    max_speed = -20
    @xv = [@xv + 2, max_speed].min if @xv < max_speed and !@jump_flag
    @xv = [@xv - 2, max_speed].max if @xv > max_speed
    @move_count = 1
  end
 
  def move_right(turn_ok = true)
    turn_right
    max_speed = 20
    @xv = [@xv + 2, max_speed].min if @xv < max_speed
    @xv = [@xv - 2, max_speed].max if @xv > max_speed and !@jump_flag
    @move_count = 1
  end
 
  def update_x
    if !@jump_flag && !moving?
      @xv = [@xv + 2, 0].min if @xv < 0
      @xv = [@xv - 2, 0].max if @xv > 0
    end
    last_x = @real_x
    @real_x += @xv
    @x = @real_x >> 7
    unless passable?(0)
      @real_x = last_x
      @x = @real_x >> 7
      @xv = 0
      touch?(0)
    end
  end
  def move_jump(yv)
    @yv = yv
    @jump_flag = true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Remember whether or not moving in local variables
    last_moving = moving?
    # If moving, event running, move route forcing, and message window
    # display are all not occurring
    unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      # Move player in the direction the directional button is being pressed
      if Input.press?(Input::LEFT)
        move_left
      elsif Input.press?(Input::RIGHT)
        move_right
      end
    end
    if Input.trigger?(Input::Y) && @jump_flag == false    # Jump
      move_jump(-50)
    end
    # Remember coordinates in local variables
    last_real_x = @real_x
    last_real_y = @real_y
    super
    # If character moves down and is positioned lower than the center
    # of the screen
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      # Scroll map down
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # If character moves left and is positioned more let on-screen than
    # center
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # Scroll map left
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # If character moves right and is positioned more right on-screen than
    # center
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # Scroll map right
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # If character moves up and is positioned higher than the center
    # of the screen
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      # Scroll map up
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # If not moving
    unless moving?
      # If player was moving last time
      if last_moving
        # Event determinant is via touch of same position event
        result = check_event_trigger_here([1,2])
        # If event which started does not exist
        if result == false
          # Disregard if debug mode is ON and ctrl key was pressed
          unless $DEBUG and Input.press?(Input::CTRL)
            # Encounter countdown
            if @encounter_count > 0
              @encounter_count -= 1
            end
          end
        end
      end
      # If C button was pressed
      if Input.trigger?(Input::C)
        # Same position and front event determinant
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end
    end
  end
end
 
class Game_Event < Game_Character
  def get_name
    return @event.name
  end
end


Cara, valeu mesmo!