Make Private Servers
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Make Private Servers

Suporte para criação e administração de servidores criados apartir do RPG maker VX/XP ou outras engines.Divulgação de seu servidor ou jogo offline.
 
PortalInícioProcurarÚltimas imagensRegistarEntrar

 

 Jump 2.0 Correr e Pular

Ir para baixo 
AutorMensagem
Moura
Admin
Admin
Moura


Mensagens : 26
Reputação : 1
Data de inscrição : 23/07/2011
Idade : 27
Localização : Amapá

Jump 2.0 Correr e Pular Empty
MensagemAssunto: Jump 2.0 Correr e Pular   Jump 2.0 Correr e Pular Icon_minitimeQua Jul 27, 2011 2:50 am

Bem esse script serve para correr e pular (pula mais longe se estiver correndo)

A tecla "A" corre e a tecla "S" pula!


aki tah o Codigo

Código:
=begin
Script criado por  - wwwcom
=end
module JUMP
  JUMP_KEY = Input::Y #Tecla para pular (tecla S no teclado)
  DASH_KEY = Input::X #Tecla para correr (tecla A no teclado)
  VAR = 1 #Variável que indica quantos tiles o herói pula (deixe o valor da variável em 0 para desativar)
end
class Game_Character
  attr_accessor:move_speed
end
class Scene_Map
  alias old_update update
  def update
    old_update
    if Input.press?(JUMP::DASH_KEY)
      $game_player.move_speed = 5
    else
      $game_player.move_speed = 4
    end
    if Input.trigger?(JUMP::JUMP_KEY) and $game_variables[JUMP::VAR] != 0
      dash = $game_player.move_speed == 5 ? 2 : 0
      case $game_player.direction
      when 2
        vx = 0
        vy = +$game_variables[JUMP::VAR] + dash
      when 4
        vx = -$game_variables[JUMP::VAR] - dash
        vy = 0
      when 6
        vx = +$game_variables[JUMP::VAR] + dash
        vy = 0
      when 8
        vx = 0
        vy = -$game_variables[JUMP::VAR] - dash
      end
      $game_player.jump(vx,vy)
    end
  end
end
Ir para o topo Ir para baixo
http://mpservers.directorioforuns.com
 
Jump 2.0 Correr e Pular
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Advanced Jump

Permissões neste sub-fórumNão podes responder a tópicos
Make Private Servers :: RPG maker XP :: Scripts-
Ir para: