RPGXP 스크립트
2010.10.14 02:54

8방향이동

조회 수 2330 추천 수 0 댓글 1
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

8방향으로이동가능


↖   ↑   ↗


←   ○   →


↙   ↓   ↘

?
  • ?
    협객 2011.06.25 02:29
    Game_Player 수정


      #--------------------------------------------------------------------------
      # ● 프레임 갱신
      #--------------------------------------------------------------------------
      def update
        # 로컬 변수에 이동중인지 어떤지를 기억
        last_moving = moving?
        # 이동중 , 이벤트 실행중 , 이동 루트 강제중 ,
        # 메세지 윈도우 표시중의 머지않아도 아닌 경우
        unless moving? or $game_system.map_interpreter.running? or
               @move_route_forcing or $game_temp.message_window_showing
          # 방향 버튼이 밀리고 있으면 , 그 방향에 플레이어를 이동
    # ★==========================================================================☆
          # 방향을 보존
          direction = @direction
          case Input.dir8
          when 1  # 좌하
            move_left
            move_down
            # 방향 고정이 아닌 경우
            unless @direction_fix
              # 오른쪽 방향이었던 경우는 왼쪽을 , 오름새였던 경우는 아래를 향하는
              @direction = (direction == 6 ? 4 : direction == 8 ? 2 : direction)
            end
          when 2  # 하
            move_down
          when 3  # 우하
            move_down
            move_right
            # 방향 고정이 아닌 경우
            unless @direction_fix
              # 좌향이었던 경우는 오른쪽을 , 오름새였던 경우는 아래를 향하는
              @direction = (direction == 4 ? 6 : direction == 8 ? 2 : direction)
            end
          when 4  # 좌
            move_left
          when 6  # 우
            move_right
          when 7  # 좌상
            move_up
            move_left
            # 방향 고정이 아닌 경우
            unless @direction_fix
              # 오른쪽 방향이었던 경우는 왼쪽을 , 하향이었던 경우는 위를 향하는
              @direction = (direction == 6 ? 4 : direction == 2 ? 8 : direction)
            end
          when 8  # 상
            move_up
          when 9  # 우상
            move_right
            move_up
            # 방향 고정이 아닌 경우
            unless @direction_fix
              # 좌향이었던 경우는 오른쪽을 , 하향이었던 경우는 위를 향하는
              @direction = (direction == 4 ? 6 : direction == 2 ? 8 : direction)
            end
          end
    # ☆==========================================================================★
        end
        # 로컬 변수에 좌표를 기억
        last_real_x = @real_x
        last_real_y = @real_y

  1. 1인용메뉴

    Date2010.07.18 CategoryRPGVX Ace 스크립트 ByA.M.S Views2609 Votes0
    Read More
  2. 1인용메뉴

    Date2010.07.18 CategoryRPGVX 스크립트 ByA.M.S Views2560 Votes0
    Read More
  3. 2D 마인크래프트 프로젝트

    Date2013.09.26 CategoryRPGXP 스크립트 By Views3048 Votes2
    Read More
  4. 3D 그래픽 파티클 스크립트

    Date2013.09.29 CategoryRPGVX 스크립트 By청담 Views1272 Votes0
    Read More
  5. 3D스크립트!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Date2014.01.18 CategoryRPGXP 스크립트 By공박사 Views2805 Votes2
    Read More
  6. 8방향 이동스크립트

    Date2014.02.22 CategoryRPGXP 스크립트 By천둥번들 Views1723 Votes6
    Read More
  7. 8방향이동

    Date2010.10.14 CategoryRPGXP 스크립트 ByA.M.S Views2151 Votes0
    Read More
  8. 8방향이동

    Date2010.10.14 CategoryRPGXP 스크립트 ByA.M.S Views2330 Votes0
    Read More
  9. 9마리 이상의 몬스터 설정 | More Enemies

    Date2018.08.31 CategoryRPGMV 플러그인 By러닝은빛 Views763 Votes0
    Read More
  10. Ace로 만든 습작 랜덤 위치로 지형변환.

    Date2014.10.04 CategoryRPGVX Ace 스크립트 ByJunkMan Views512 Votes0
    Read More
  11. Action Sequence Pack 2 (전투모드 액션 플러그인)

    Date2016.01.05 CategoryRPGMV 플러그인 Byplam Views1821 Votes0
    Read More
  12. Advanced Game Time (게임에 시간개념을 적용해주는 플러그인)

    Date2016.01.06 CategoryRPGMV 플러그인 Byplam Views1398 Votes0
    Read More
  13. AraLab_MultiStartingPoint (다중 출발점 스크립트, 캐릭터 선택 스크립트) ver.0.2beta

    Date2014.01.21 CategoryRPGXP 스크립트 By 운 Views1973 Votes1
    Read More
  14. Bind Pictures To Map (이미지 결합 플러그인)

    Date2015.10.30 CategoryRPGMV 플러그인 By이녕 Views1049 Votes0
    Read More
  15. Crafting System (아이템 조합 시스템)

    Date2016.01.06 CategoryRPGMV 플러그인 Byplam Views1709 Votes0
    Read More
  16. CSS 캔버스 필터

    Date2016.10.06 CategoryRPGMV 플러그인 By러닝은빛 Views912 Votes0
    Read More
  17. Custom Icon Sheets (커스텀 아이콘 적용 스크립트)

    Date2016.01.10 CategoryRPGVX Ace 스크립트 Byplam Views470 Votes0
    Read More
  18. c[n] 명령어 줄때의 색상 결정.

    Date2008.02.14 CategoryRPGXP 스크립트 By창조도시 Views1015 Votes1
    Read More
  19. c[n] 명령어 줄때의 색상 결정.

    Date2008.02.14 CategoryRPGXP 스크립트 By창조도시 Views1438 Votes1
    Read More
  20. Damage Popup by Dargor (데미지 수치 팝업하는 스크립트)

    Date2016.01.10 CategoryRPGVX Ace 스크립트 Byplam Views612 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






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

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