2006.08.08 05:28

횡스크롤 스크립트...

조회 수 512 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
#########################
#하늘을날아 #################
#########################
#퍼온것이다~
#번역:오늘도 즐겁게..
#==============================================================================
# □ 커스터마이즈 포인트
#==============================================================================
class XRXS50
  #
  # Action-Maps 를 가동시키는 맵 ID의 배열
  #
  ENABLE_FULL_ACTY_MAPS = [1, 2]
  #
  # 「기울기 강하」
  #
  ENABLE_SLIDE_DESCENT = true
  #
  # 방향 점프(true=진실한  : 향하고 있을 방향에 점프。
  #              false=틀린 : 키가 밀리고 있을 방향에 점프。)
  #
  JUMP_AS_KEY = false
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ○ 공개 인스턴스 변수
  #--------------------------------------------------------------------------
  # 기존
  attr_writer   :direction_fix
  attr_accessor :walk_anime
  # 신규
  attr_accessor :now_jumps
  attr_writer   :xrxs50_direction_sidefix
  #--------------------------------------------------------------------------
  # ○최대 점프 회수
  #--------------------------------------------------------------------------
  def max_jumps
    return 1
  end
  #--------------------------------------------------------------------------
  # ● 왼쪽을 향한다
  #--------------------------------------------------------------------------
  alias xrxs50_turn_left turn_left
  def turn_left
    if @xrxs50_direction_sidefix
      @direction = 4
    else
      xrxs50_turn_left
    end
  end
  #--------------------------------------------------------------------------
  # ● 오른쪽을 향한다
  #--------------------------------------------------------------------------
  alias xrxs50_turn_right turn_right
  def turn_right
    if @xrxs50_direction_sidefix
      @direction = 6
    else
      xrxs50_turn_right
    end
  end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  alias xrxs50_main main
  def main
    # 체크
    xrxs50_enable_check
    # 귀환시킨다
    xrxs50_main
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias xrxs50_update update
  def update
    # 귀환시킨다
    xrxs50_update
    # 프레임 갱신 (좌표계 갱신)
    if @xrxs50_enable
      update_coordinates
    end
  end
  #--------------------------------------------------------------------------
  # ○ 프레임 갱신 (좌표계 갱신)
  #--------------------------------------------------------------------------
  def update_coordinates
    if $game_player.passable?($game_player.x,$game_player.y,2)
      unless $game_player.moving?
        if XRXS50::ENABLE_SLIDE_DESCENT and
           Input.press?(Input::RIGHT) and
           $game_player.passable?($game_player.x,$game_player.y+1,6)
          $game_player.move_lower_right
        elsif XRXS50::ENABLE_SLIDE_DESCENT and
              Input.press?(Input::LEFT) and
              $game_player.passable?($game_player.x,$game_player.y+1,4)
          $game_player.move_lower_left
        else
          $game_player.move_down
        end
      end
    else
      $game_player.move_down
      $game_player.walk_anime = true unless $game_player.walk_anime
      $game_player.now_jumps  = 0
      if Input.trigger?(Input::X) and
         $game_player.now_jumps < $game_player.max_jumps
        if XRXS50::JUMP_AS_KEY
          direction = $game_player.direction == 4 ? -1 : 1
        else
          if Input.press?(Input::RIGHT)
            direction = 1
          elsif Input.press?(Input::LEFT)
            direction = -1
          else
            direction = 0
          end
        end
        $game_player.jump(direction, -1)
        $game_player.now_jumps += 1
        $game_player.walk_anime = false
      end
    end
  end
  #--------------------------------------------------------------------------
  # ●  플레이어의 장소 이동
  #--------------------------------------------------------------------------
  alias xrxs50_transfer_player transfer_player
  def transfer_player
    # 귀환시킨다
    xrxs50_transfer_player
    # 체크
    xrxs50_enable_check
  end
  #--------------------------------------------------------------------------
  # ○ XRXS50 하지만 가동할까 판정
  #--------------------------------------------------------------------------
  def xrxs50_enable_check
    if XRXS50::ENABLE_FULL_ACTY_MAPS.include?($game_map.map_id)
      $game_player.now_jumps = 0 if $game_player.now_jumps.nil?
      @xrxs50_enable = true
      $game_player.direction_fix = true
      $game_player.xrxs50_direction_sidefix = true
    else
      @xrxs50_enable = false
      $game_player.direction_fix = false
      $game_player.xrxs50_direction_sidefix = false
    end
  end
end
#점프키 a

이것이 제가 게임만드는데 필요한 횡스크롤 스크립트입니다.
그런데 문제가 하나 발생했죠 !!
바로... 사다리를 못 올라가고 내려온다는거!!! 위 키를 눌러도 점프만 하고 A키를 눌러도...
점프만하고... 해결법 없을까요?
?

List of Articles
번호 제목 글쓴이 날짜 조회 수
8808 흐 사진안올라가서 다시올립니다 1 겜알못 2015.04.16 422
8807 휴대폰에 있는 글씨체 레이븐 2014.03.27 583
8806 휴대폰 게임 실행이 안되요 도와주세요ㅜㅜ 1 데거스 2018.01.11 834
8805 훔 자주 질문하네요.. 1 카리스 2005.08.21 368
8804 훔 자주 질문하네요.. 1 MiNi'M' 2005.08.21 384
8803 훔 자주 질문하네요.. 1 ☆무적기사★ 2005.08.21 624
8802 효과음을 퍼가려고하는데 어떻게퍼가나요...? 쿠로쿠마 2010.03.06 1537
8801 효과음 찾기 2 땅콩메이커 2014.10.10 565
8800 효과음 다운받는 방법을 알고 싶습니다 다크세이버™ 2006.07.31 156
8799 효과음 다운받는 방법을 알고 싶습니다 file Blue Wolf 2006.07.31 309
8798 횡스크롤의 점프기능에 대해서 의뢰드립니다. 『연금술사』 2006.01.07 325
8797 횡스크롤의 점프기능에 대해서 의뢰드립니다. 「〃슈마해킹‥」 2006.01.07 401
8796 횡스크롤 점프 Noram 2015.03.28 390
8795 횡스크롤 액알 원경 질문 다시 ; 다크아머 2006.05.05 265
8794 횡스크롤 액알 원경 질문 다시 ; 『신쿠ㅡ★』 2006.05.05 393
» 횡스크롤 스크립트... 오징어쪼아 2006.08.08 512
8792 획득경험치를 변수로 구할수 잇나요? 1 2 wshboy 2012.10.30 1194
8791 회원추천 게임란에서 찾으실 수도 있지만, 아란 2006.08.26 207
8790 회원정보중에.... 4 겜겜이 2015.03.26 322
8789 회원가입했는데 왜안돼요? 1 h서영 2014.01.21 319
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 442 Next
/ 442






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)