VX 스크립트

말그대로 비행선을 더 높이 뜨게 하는 스크립트 입니다.

기존의 비행선은 캐릭터의 바로 위를 날아 다녔잖아요?(사람 키만큼밖에 안뜨는 비행선이라니... 말도 안돼! <퍽!)

그래서! 비행선의 비행 높이를 증가시키는 스크립트를 소개하겠습니다~

여기서 MAX AlTITUDE라고 표시되어 있는 곳의 값을 변경 시키면 어떤 높이로든 날게할 수 있습니다.

아래부터 복사

==============================================================================
# Fly High 1.0
#------------------------------------------------------------------------------
# Este script permite que você modifique a altura em que o AirShip voa.
# Para entender melhor este script, leia as modificações em baixo.
#==============================================================================

class Game_Vehicle < Game_Character
  #--------------------------------------------------------------------------
  # Constantes (Altura do Vôo)
  #--------------------------------------------------------------------------
  MAX_ALTITUDE = 100
 
#Procedimento:
  # Se quiser que a AirShip vôo mais alto, basta modificar o
  #algarismo 100 por um mais elevado como por exemplo: 200.
  #Se quiser que a AirShip vôo mais baixo, basta fazer o oposto, modificando
  #o algarismo 100 por um inferior como por exemplo: 60.
  #--------------------------------------------------------------------------
  # Variáveis públicas
  #--------------------------------------------------------------------------
  attr_reader   :type                     # Tipo de veículo (0 .. 2)
  attr_reader   :altitude                 # Altitude para airship
  attr_reader   :driving                  # Marca execução
  #--------------------------------------------------------------------------
  # Inicialização do objeto
  #     type : Tipo de veículo (0:barco 1:navio 2:airship)
  #--------------------------------------------------------------------------
  def initialize(type)
    super()
    @type = type
    @altitude = 0
    @driving = false
    @direction = 4
    @walk_anime = false
    @step_anime = false
    load_system_settings
  end
  #--------------------------------------------------------------------------
  # Carregamento da construção de sistema
  #--------------------------------------------------------------------------
  def load_system_settings
    case @type
    when 0;  sys_vehicle = $data_system.boat
    when 1;  sys_vehicle = $data_system.ship
    when 2;  sys_vehicle = $data_system.airship
    else;    sys_vehicle = nil
    end
    if sys_vehicle != nil
      @character_name = sys_vehicle.character_name
      @character_index = sys_vehicle.character_index
      @bgm = sys_vehicle.bgm
      @map_id = sys_vehicle.start_map_id
      @x = sys_vehicle.start_x
      @y = sys_vehicle.start_y
    end
  end
  #--------------------------------------------------------------------------
  # Atualização
  #--------------------------------------------------------------------------
  def refresh
    if @driving
      @map_id = $game_map.map_id
      sync_with_player
    elsif @map_id == $game_map.map_id
      moveto(@x, @y)
    end
    case @type
    when 0;
      @priority_type = 1
      @move_speed = 4
    when 1;
      @priority_type = 1
      @move_speed = 5
    when 2;
      @priority_type = @driving ? 2 : 0
      @move_speed = 6
    end
    @walk_anime = @driving
    @step_anime = @driving
  end
  #--------------------------------------------------------------------------
  # Mudar posição
  #     map_id : ID do mapa
  #     x      : coordenada X
  #     y      : xoordenada Y
  #--------------------------------------------------------------------------
  def set_location(map_id, x, y)
    @map_id = map_id
    @x = x
    @y = y
    refresh
  end
  #--------------------------------------------------------------------------
  # Verificando coincidências de coordenadas
  #     x : coordenada X
  #     y : xoordenada Y
  #--------------------------------------------------------------------------
  def pos?(x, y)
    return (@map_id == $game_map.map_id and super(x, y))
  end
  #--------------------------------------------------------------------------
  # Transparência
  #--------------------------------------------------------------------------
  def transparent
    return (@map_id != $game_map.map_id or super)
  end
  #--------------------------------------------------------------------------
  # Entrar no veículo
  #--------------------------------------------------------------------------
  def get_on
    @driving = true
    @walk_anime = true
    @step_anime = true
    if @type == 2               # Caso seja uma airship
      @priority_type = 2        # Mudar prioridade para "junto ao herói"
    end
    @bgm.play                   # Reproduz música
  end
  #--------------------------------------------------------------------------
  # Sair do veículo
  #--------------------------------------------------------------------------
  def get_off
    @driving = false
    @walk_anime = false
    @step_anime = false
    @direction = 4
  end
  #--------------------------------------------------------------------------
  # Sincronização com o jogador
  #--------------------------------------------------------------------------
  def sync_with_player
    @x = $game_player.x
    @y = $game_player.y
    @real_x = $game_player.real_x
    @real_y = $game_player.real_y
    @direction = $game_player.direction
    update_bush_depth
  end
  #--------------------------------------------------------------------------
  # Velocidade
  #--------------------------------------------------------------------------
  def speed
    return @move_speed
  end
  #--------------------------------------------------------------------------
  # Coordenadas Y na tela
  #--------------------------------------------------------------------------
  def screen_y
    return super - altitude
  end
  #--------------------------------------------------------------------------
  # Verifica se é possível mover
  #--------------------------------------------------------------------------
  def movable?
    return false if (@type == 2 and @altitude < MAX_ALTITUDE)
    return (not moving?)
  end
  #--------------------------------------------------------------------------
  # Atualização da tela
  #--------------------------------------------------------------------------
  def update
    super
    if @type == 2               # Caso seja uma airship
      if @driving
        if @altitude < MAX_ALTITUDE
          @altitude += 1        # Aumenta a altitude
        end
      elsif @altitude > 0
        @altitude -= 1          # Diminui a altitude
        if @altitude == 0
          @priority_type = 0    # Retorna para prioridade "abaixo do herói"
        end
      end
    end
  end
end

#----------------------------------------------------------------------------
#                                 Fly High 1.0
#                       www.rpgmakerbrasil.com/forum/
#----------------------------------------------------------------------------

지금까지! 루시페르였습니다!~
Comment '8'
  • ?
    Zero_Som 2009.06.06 18:03

    높이? 어떻게 구현되나 궁금하군요 ㅎㅎ

     

  • ?
    IceSky 2009.06.06 20:13

    허.. 한번 테스트 해볼까?

  • ?
    백년술사 2009.06.09 22:52
    드레곤볼 게임 만들때 쓰면 좋을지도...
  • ?
    나이스goo 2009.06.20 15:27
    오진짜. 놉게난다/...
  • ?
    불독 2009.12.06 18:23

    이거... 그냥 스크립트 추가하지말고 Game_Vehicle스크립트 중에서 12번째 줄 32라고 나와있는 숫자를 늘리면 높이 날고 줄이면 낮게 납니다.

    괜히 스크립트 추가하실 필요가 전혀 없어요...ㅜㅜ

  • ?
    뾰롱뾰롱 2011.02.25 02:29

    ㅋㅋㅋㅋㅋ 레알 그렇네

  • ?
    언제나웃음 2010.01.01 22:23

    비행선 스피드도 빨라짐

  • ?
    모험소년 2010.01.07 18:02

    이게 어디가 어이없죠..? 은근 필요있는 녀석인데 ㅋㅋㅋ


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
90 기타 블록 미니게임 11 file 사람이라면? 2010.08.15 2269
89 기타 이벤트 상세효과 9 file 사람이라면? 2010.08.15 2801
88 기타 개인판타지메뉴+업그래이드 배틀 23 file 콩밥 2010.08.02 4211
87 기타 [자작]게임 실행시 파일 체크 프로그램. 또는 파일 실행기. 16 file NightWind AYARSB 2010.05.20 3193
86 기타 전투후 이어지는 베경음 9 비극ㆍ 2010.04.19 2190
85 기타 Lock Screen 3 비극ㆍ 2010.04.19 2012
84 기타 레벨업 이펙트... 20 비극ㆍ 2010.04.19 3768
83 기타 세이브 포인트 2 비극ㆍ 2010.04.19 2518
82 기타 그림자 없애기... 3 비극ㆍ 2010.04.19 1642
81 기타 메뉴에서 애니매이션 사용! 12 비극ㆍ 2010.04.19 3022
80 기타 스크린샷 기능 14 비극ㆍ 2010.04.19 2090
79 기타 땅파기 18 file 비극ㆍ 2010.04.19 3013
78 기타 화폐단위 구분해 주는 스크립트 38 file 허걱 2010.04.13 3652
77 기타 낚시 스크립트~(낚시대로 하는 낚시가 아니라 사람을 낚는 낚시 스크립트) 14 file ~AYARSB~ 2010.03.18 3630
76 기타 통합 스크립트(좋은 마우스 스크립트 좋은거),KGC좋은거 새로운 거 스크립트 세이브 스크립트 좋은거!~~~~~ 14 알피지GM 2010.03.07 3829
75 기타 (이거 정말 좋군요) 말이나 용을 탈수있게 하는 스크립트. 31 file 아방스가 짱 2010.02.28 4261
74 기타 카지노 슬롯머신 15 file 아방스가 짱 2010.02.28 3023
73 기타 아이콘 캐릭터 17 file 허걱 2010.02.28 4225
72 기타 화면에 그림 그리는 스크립트 21 file 강진수 2010.02.27 2962
71 기타 Crissaegrim 농장시스템 한글화 28 file 도심 2009.12.22 3606
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7