XP 스크립트

8방향 갈때 8방향이동 캐릭터 없어도 됩니다.

그리고 대쉬 속도 바꿀수 있고 원래 속도도 바꿀수 있습니다.(스크립트 엄청 초반에 나옴)

 

 

 

 

 

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆데쉬&8방향 이동 - KGC_Dash_8DirMove◆
#_/----------------------------------------------------------------------------
#_/ 맵 이동시의 데쉬&8방향 이동 기능을 추가합니다.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ 커스터마이즈 항목 ★
#==============================================================================

module KGC
  # ◆데쉬 버튼
  D8DM_DASH_BUTTON = Input::A
  # ◆데쉬 속도
  D8DM_DASH_SPEED = 5
  # ◆보행 속도
  D8DM_WALK_SPEED = 4
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_System
#==============================================================================

class Game_System
 #--------------------------------------------------------------------------
 # ● 공개 인스턴스 변수
 #--------------------------------------------------------------------------
  attr_accessor :dash_permit              # 데쉬 허가 플래그
  attr_accessor :dir8_permit              # 8방향 이동 허가 플래그
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  alias initialize_KGC_Dash_8DirMove initialize
  def initialize
   # 원래의 처리를 실행
    initialize_KGC_Dash_8DirMove

    @dash_permit, @dir8_permit = true, true
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Player
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  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
      # 方向ボタンが押されていれば、その方向へプレイヤ?を移動
      if $game_system.dir8_permit
        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
      else
        case Input.dir4
        when 2
          move_down
        when 4
          move_left
        when 6
          move_right
        when 8
          move_up
        end
      end

      # ダッシュが許可されており、かつダッシュボタンが押されている場合
      if $game_system.dash_permit && Input.press?(KGC::D8DM_DASH_BUTTON)
        # ダッシュ速度に?更
        @move_speed = KGC::D8DM_DASH_SPEED
      else
        # ?行速度に?更
        @move_speed = KGC::D8DM_WALK_SPEED
      end
    end
    # ロ?カル??に座標を記憶
    last_real_x = @real_x
    last_real_y = @real_y
    super
    # キャラクタ?が下に移動し、かつ?面上の位置が中央より下の場合
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      # マップを下にスクロ?ル
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # キャラクタ?が左に移動し、かつ?面上の位置が中央より左の場合
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # マップを左にスクロ?ル
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # キャラクタ?が右に移動し、かつ?面上の位置が中央より右の場合
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # マップを右にスクロ?ル
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # キャラクタ?が上に移動し、かつ?面上の位置が中央より上の場合
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      # マップを上にスクロ?ル
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # 移動中ではない場合
    unless moving?
      # 前回プレイヤ?が移動中だった場合
      if last_moving
        # 同位置のイベントとの接?によるイベント起動判定
        result = check_event_trigger_here([1,2])
        # 起動したイベントがない場合
        if result == false
          # デバッグモ?ドが ON かつ CTRL キ?が押されている場合を除き
          unless $DEBUG and Input.press?(Input::CTRL)
            # エンカウント カウントダウン
            if @encounter_count > 0
              @encounter_count -= 1
            end
          end
        end
      end
      # C 버튼이 밀렸을 경우
      if Input.trigger?(Input::C)
        # 同位置および正面のイベント起動判定
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end
    end
  end
end

 

 

 

중복이면 바로 삭제하겠습니다.

Who's WinHouse

?

Oh, I'm So Boring!

Comment '63'
  • profile
    Lathrion 2010.06.12 13:49

    오! 좋네요!

  • ?
    포인트팡팡 2010.06.12 15:19
    축하합니다. WinHouse님은 60포인트에 당첨되셨습니다
  • ?
    WinHouse 2010.06.12 15:19

    감사합니다.

  • ?
    Tassy 2010.06.12 14:43

    출저 : KGC

  • ?
    Tassy 2010.06.13 08:06

    그 건 둘 째 치 고 감사합니다.

  • ?
    WinHouse 2010.06.12 15:20

    그래요?전 친구가 알려줘서 올린건데...

    아무튼 알려주셔서 감사합니다.

  • ?
    rpg만들기시리즈짱 2010.06.13 12:00

    thank you

  • ?
    WinHouse 2010.06.15 15:52

    잘쓰시길

  • ?
    chirhdmlskf 2010.06.14 18:12

    감사요

  • ?
    WinHouse 2010.06.15 15:51

    감사하시다니 다행입니다. 잘 쓰시길

  • ?
    WinHouse 2010.06.15 15:48

    제가 올린 스크립트가 인기 스크립트에 올라오다니 감사합니다.

  • ?
    Tassy 2010.06.15 19:46

    죄송하지만 며칠 있으면 자리 뺏겨요,

    최신만 1등 시켜줍니다.

    제 스크립트도 1등이었건만...

  • profile
    wjdtn3018 2010.06.19 15:17

    잘쓸게요

  • ?
    야구소년 2010.07.03 08:07

  • ?
    포인트팡팡 2010.07.03 08:07
    축하합니다. 야구소년님은 60포인트에 당첨되셨습니다
  • ?
    주홍색 2010.07.04 15:31

    고마워요 사랑합니다

  • ?
    WinHouse 2010.07.05 15:18

    으잌!

  • ?
    엑스 2010.07.10 15:57

    잘씁니다 ^^

  • ?
    BJ매냐 2010.07.14 22:23

    잘쓸꼐연

  • ?
    블루피쉬 2010.07.16 16:10

    와후

  • ?
    하츠네미쿠 2010.07.21 09:10

    감사합니다~

  • ?
    용용용 2010.07.22 16:06

    포인트 ㅅㅂ

  • ?
    고돌2 2010.07.24 03:16

    포인트가.

  • ?
    포인트팡팡 2010.07.24 03:16
    축하합니다. 고돌2님은 500포인트에 당첨되셨습니다
  • ?
    Outsider2 2010.07.24 10:07

    감사합니다.

  • ?
    매운맛 2010.07.25 20:56

    포인트가..

  • ?
    매운맛 2010.07.25 20:56

    잘쓰겠습니다

  • ?
    매운맛 2010.07.25 21:09

    이 스크립트에서 쉬프트 누를때마다 주인공 그래픽을 달리는 그림으로 바꾸고 싶은데 스크립트를 만질줄 몰라서... 쫌 도와주세요!!

  • ?
    Neowitch* 2010.07.25 23:03

    감사요 ㅋ

  • profile
    시나토 2010.07.26 12:01

     

  • ?
    최순범 2010.07.26 13:59

    와우좋네여

  • ?
    포인트팡팡 2010.07.26 13:59
    축하합니다. 최순범님은 90포인트에 당첨되셨습니다
  • ?
    Soup 2010.08.08 19:23

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

    ㄳㄳㄳㄳㄳㄳㄳㄳㄳㄳ

  • ?
    머쉬룸 2010.08.09 14:20

    오 좋은자료라서 감사한데...

    대쉬가 넘 빠름 ㅠㅠ

  • ?
    신이치 2010.08.11 11:34

    감사합니닷^^

  • ?
    낙서 2010.08.16 17:29

    ㄳㄳㄱ

  • ?
    오마이쉴드 2010.08.18 08:58

    응?

  • ?
    뭘바 look at me! 2010.08.19 22:42

     

  • ?
    뱅뱅뱅 2010.08.29 22:23

    ㄳㄳㄳㄳㄳ

  • ?
    모리야스와코 2010.10.17 20:31

    다운받아 보려고하는데 초보라 어떻게써야할지 ㅠㅠ; 스크립트 Game Player 어디에다 넣는거죠?

  • ?
    박두츈 2010.10.18 17:25

    감사요

    이거 새로 만들어서 해야하죠? 스크립트 메뉴

  • profile
    워메 2010.10.23 16:04

    감사합니다 ㅠㅠ 

  • ?
    둥팅이 2010.10.31 21:24

    rttrㅅㄳㄳㄳ

     

  • ?
    날개잃은악마 2010.11.14 00:17

    우왕ㅋ 굳ㅋ

    진짜 필요 했던건데.

  • profile
    네메닷 2010.11.20 14:10

    게임타이틀 스크립트하고 충돌 ㄷㄷ

  • ?
    칼리아 2010.12.21 21:33

    감사함당

  • ?
    청풍쾌검 2011.01.01 20:03

    ㄳ!

  • ?
    청풍쾌검 2011.01.03 14:03

    나도포인트팡팡한테포인트받고싶다ㅠㅠㅠㅠ

  • profile
    에돌이 2011.01.30 15:15

    감사합니다.

  • ?
    하나둘셋 2011.02.05 22:58

    오 찾고 있던 거네요 감사합니다.


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
921 전체화면 스크립트[해상도 스크립트랑 중복사용 불가] 24 file - 하늘 - 2009.08.06 3974
920 전투 RTAB 1.16ver 12 file 백호 2009.02.22 3960
919 장비 CSSR8-장비품 생산&강화 시스템 18 file 백호 2009.02.22 3959
918 영상 플래시 동영상 재생 스크립트 사용법 및 다운로드 8 아방스 2010.11.02 3917
917 아이템 심플 액알 [리젠, 아이템 드롭] 18 file 백호 2009.02.21 3917
916 HUD [VX 가능] 이벤트 이름 띄우기 41 file 독도2005 2009.08.22 3902
915 전투 XAS Hero Edition Ver. 3.91 3 프리즌커피 2011.12.23 3894
914 기타 [자작]데미지표시 19 file JACKY 2012.02.15 3837
913 스킬 약간 수정한 심플액알(크리티컬,스킬) 10 백호 2009.02.22 3835
912 이동 및 탈것 아하! 그렇구나의 3D 신기술 체험 2 23 아하!잘봤어요. 2010.02.28 3815
911 기타 3D스크립트 48 file ok하승헌 2010.02.18 3808
910 기타 [게이지바]HelloCoaVer4.0 업데이트 속도 변경 [오랜만의 업데이트] 30 file 코아 코스튬 2011.04.02 3787
909 전투 보행그래픽으로 싸우는 턴알 17 백호 2009.02.22 3782
908 파티 KGC-대규모파티 25 rgnrk001 2010.03.01 3770
907 이동 및 탈것 동료들끼리 따라오는 스크립트 41 file ◐아이흥행 2010.01.23 3714
906 [스마슈님 제공] 부활스크립트 19 file 아방스 2007.11.09 3705
905 기타 만화형태 말칸 스크립트 28 file 백호 2009.02.22 3704
904 저장 [ AutoSave ]오토세이브, 뜻 그대로 자동저장스크립트 17 file 제로스S2 2009.08.06 3694
903 sbabs - 몬스터 게이지 표시 스크립트 13 file 아방스 2007.11.09 3667
902 기타 [신기술 체험] RPGXP 3D 9 file 백호 2009.02.22 3633
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52