Ace 스크립트

RGSS3_8direction_move_v1.01

 

번역 해서 얻어냈습니당~

 

VX 처럼 8방향으루 가는 스크립트 >.<

 

대시는 없네영...ㅜㅜ

 

RGSS3_8direction_move_v1.01.txt

 

#==============================================================================
# ■ RGSS3 8 방향 이동 스크립트 Ver1.01 by 成石, Transplant 쿠쿠밥솥

#------------------------------------------------------------------------------
#  플레이어 캐릭터의 8 방향 이동을 가능하게 합니다.
#   그 외, 플레이어의 이동에 관한 일부 기능에 대해 설정할 수 있습니다.
#   기본적으로 기능확장 의뢰나 경합 대응은 받아들이고 있지 않습니다.양해 바랍니다.
#
#   갱신 이력
#   Ver1.01 불필요한 기술 일점을 삭제.
#           스윗치 변환에 의한 대시 금지 기능을 추가.
#==============================================================================

module MOVE_CONTROL
 
  #이 번호의 스윗치가 ON때, 8 방향 이동을 금지해, 4 방향 이동에만 합니다.
 
  FOUR_MOVE_SWITCH = 51
 
  #이 번호의 스윗치가 ON때, 플레이어 캐릭터의 조작을 금지합니다.
 
  MOVE_SEAL_SWITCH = 52
 
  #이 번호의 스윗치가 ON때, 대시 판정이 역전합니다.
  #(평상시가 대시, 대시 키를 누르고 있는 상태로 통상 보행이 됩니다)
 
  DASH_REV = 53
 
  #이 번호의 스윗치가 ON때, 대시를 사용할 수 없게 됩니다.
  #(스윗치를 바꾸는 일로, 동일 맵으로
  #  대시의 할 수 있는 장소와 그렇지 않은 장소를 나눌 수 있습니다)
 
  DASH_SEAL = 54
 
  #이 번호의 변수가 0보다 클 때, 대시 때의 속도가 더욱 증가합니다.
 
  DASH_PLUS = 19
 
end

class Game_CharacterBase
  #--------------------------------------------------------------------------
  # ● 이동 속도의 취득(대시를 고려)
  #--------------------------------------------------------------------------
  alias real_move_speed_8direction real_move_speed
  def real_move_speed
    if $game_variables[MOVE_CONTROL::DASH_PLUS] > 0
      dash_plus = 1 + ($game_variables[MOVE_CONTROL::DASH_PLUS] * 0.1)
      @move_speed + (dash? ? dash_plus : 0)
    else
      real_move_speed_8direction
    end
  end
end

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● 대시 상태 판정
  #--------------------------------------------------------------------------
  alias dash_rev? dash?
  def dash?
    return false if $game_switches[MOVE_CONTROL::DASH_SEAL] == true
    if $game_switches[MOVE_CONTROL::DASH_REV] == true
      return false if @move_route_forcing
      return false if $game_map.disable_dash?
      return false if vehicle
      return false if Input.press?(:A)
      return true
    else
      dash_rev?
    end
  end
  #--------------------------------------------------------------------------
  # ● 방향 버튼 입력에 의한 이동 처리
  #--------------------------------------------------------------------------
  alias move_by_input_8direction move_by_input
  def move_by_input
    return if $game_switches[MOVE_CONTROL::MOVE_SEAL_SWITCH] == true
    if $game_switches[MOVE_CONTROL::FOUR_MOVE_SWITCH] == true
      move_by_input_8direction
      return
    end
    return if !movable? || $game_map.interpreter.running?
    if Input.press?(:LEFT) && Input.press?(:DOWN)
      if passable?(@x, @y, 4) && passable?(@x, @y, 2) &&
        passable?(@x - 1, @y, 2) && passable?(@x, @y + 1, 4) &&
        passable?(@x - 1, @y + 1, 6) && passable?(@x - 1, @y + 1, 8)
        move_diagonal(4, 2)
      elsif @direction == 4
        if passable?(@x, @y, 2) && passable?(@x, @y + 1, 8)
          move_straight(2)
        elsif passable?(@x, @y, 4) && passable?(@x - 1, @y, 6)
          move_straight(4)
        end
      elsif @direction == 2
        if passable?(@x, @y, 4) && passable?(@x - 1, @y, 6)
          move_straight(4)
        elsif passable?(@x, @y, 2) && passable?(@x, @y + 1, 8)
          move_straight(2)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      else
        move_straight(Input.dir4) if Input.dir4 > 0
      end
    elsif Input.press?(:RIGHT) && Input.press?(:DOWN)
      if passable?(@x, @y, 6) && passable?(@x, @y, 2) &&
        passable?(@x + 1, @y, 2) && passable?(@x, @y + 1, 6) &&
        passable?(@x + 1, @y + 1, 4) && passable?(@x + 1, @y + 1, 8)
        move_diagonal(6, 2)
      elsif @direction == 6
        if passable?(@x, @y, 2) && passable?(@x, @y + 1, 8)
          move_straight(2)
        elsif passable?(@x, @y, 6) && passable?(@x + 1, @y, 4)
          move_straight(6)
        end
      elsif @direction == 2
        if passable?(@x, @y, 6) && passable?(@x + 1, @y, 4)
          move_straight(6)
        elsif passable?(@x, @y, 2) && passable?(@x, @y + 1, 8)
          move_straight(2)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      else
        move_straight(Input.dir4) if Input.dir4 > 0
      end
    elsif Input.press?(:LEFT) && Input.press?(:UP)
      if passable?(@x, @y, 4) && passable?(@x, @y, 8) &&
        passable?(@x - 1, @y, 8) && passable?(@x, @y - 1, 4) &&
        passable?(@x - 1, @y - 1, 2) && passable?(@x - 1, @y - 1, 6)
        move_diagonal(4, 8)
      elsif @direction == 4
        if passable?(@x, @y, 8) && passable?(@x, @y - 1, 2)
          move_straight(8)
        elsif passable?(@x, @y, 4) && passable?(@x - 1, @y, 6)
          move_straight(4)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      elsif @direction == 8
        if passable?(@x, @y, 4) && passable?(@x - 1, @y, 6)
          move_straight(4)
        elsif passable?(@x, @y, 8) && passable?(@x, @y - 1, 2)
          move_straight(8)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      else
        move_straight(Input.dir4) if Input.dir4 > 0
      end
    elsif Input.press?(:RIGHT) && Input.press?(:UP)
      if passable?(@x, @y, 6) && passable?(@x, @y, 8) &&
        passable?(@x + 1, @y, 8) && passable?(@x, @y - 1, 6) &&
        passable?(@x + 1, @y - 1, 2) && passable?(@x + 1, @y - 1, 4)
        move_diagonal(6, 8)
      elsif @direction == 6
        if passable?(@x, @y, 8) && passable?(@x, @y - 1, 2)
          move_straight(8)
        elsif passable?(@x, @y, 6) && passable?(@x + 1, @y, 4)
          move_straight(6)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      elsif @direction == 8
        if passable?(@x, @y, 6) && passable?(@x + 1, @y, 4)
          move_straight(6)
        elsif passable?(@x, @y, 8) && passable?(@x, @y - 1, 2)
          move_straight(8)
        else
          move_straight(Input.dir4) if Input.dir4 > 0
        end
      else
        move_straight(Input.dir4) if Input.dir4 > 0
      end
    else
      move_straight(Input.dir4) if Input.dir4 > 0
    end
    unless moving?
      @direction = Input.dir4 unless Input.dir4 == 0
    end
  end
end

 

┘스크립트 여기까지 

Who's 쿠쿠밥솥

profile

쿠쿠밥솥 -> zubako

Atachment
첨부 '1'
  • ?
    달밤에왈츠 2012.01.24 20:06

    좋은 자료 감사합니다. ^^ 전 vx 때도 이 스크립트를 적용해본 적이 없어서 어떻게 갈 지 궁금하네요. 대충 상상은 가지만.

  • ?
    가로니 2012.01.26 22:18

    정말 감사합니다! 저.. 그런데 실례지만 어떤 사이트에서 찾으셨는지 너무 궁금한데요.. 가르쳐주실수 있으실까요?

  • profile
    안모군 2012.04.12 16:13

    오우! 희귀자료가 나와 있었군요! 감사히 받아갑니다!

  • profile
    조말생 2012.04.20 00:07
    스크립트 새공간을 만들어서 붙여넣으면 되나요?
  • profile
    조말생 2012.04.20 19:17
    +ㅅ + 적용완료! 너무 멋지군요!! 컨트롤이 오리지널보다 훨씬 좋아졌어요!
  • ?
    닉네임이없다능 2012.08.08 11:21
    감사합니당~
  • profile
    Ilike게임 2012.09.18 15:51
    정말 귀한 스크립트 주셔서 감사합니다.
    대쉬도 잘되고, 이동도 잘되고
    훨씬 컨트롤이 자연스럽네요!
  • ?
    산신령 2013.01.07 23:56
    감사히 쓰겠습니다.
    열심히 공부해서 저도 언젠가 스크립트 제공자가 되어야겠어요.
  • ?
    또지 2013.05.14 17:26
    오옷! rpg의 혁명이닷!!!
  • ?
    빼리쏭 2013.07.22 17:12
    감사합니다! 안그래도 사선이동은 어떻게 해야되나 했는데ㅎㅎㅎ
  • profile
    L크로노스 2013.08.07 00:58
    스크립트 어디에다 해야될지 모르겠습니다
  • ?
    알리아 2013.09.11 01:47
    정말 감사합니다! 덕분에 8방향이 될 수 있네요.ㅠㅠ 정말정말 감사합니다!
  • ?
    녹차밥 2014.02.08 14:16
    감사합니다! 따로 이미지 안 넣어도 간편하게 사용 가능하겠네요!
  • ?
    Green 2014.05.04 18:56
    우와 감사합니다!! 감사히 잘 쓸게요!
  • ?
    ringbellring 2014.07.13 17:32
    좋은 자료 감사합니다 ^_^ 덕분에 고민하던 문제가 풀렸네요.
  • profile
    샤방샤방람머스 2018.02.25 21:41
    와..엄청나게 감사합니다!
  • profile
    계란과자 2022.09.17 01:52
    와,,,,너무 좋아요 감격....

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5109
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28923
17 타이틀/게임오버 코아 코스튬씨의 랜덤 타이틀 스크립트를 VX Ace용으로 변환 (완성판) 2 Alkaid 2012.01.25 3980
» 이동 및 탈것 RPG VX ACE ( RGSS3_8direction_move_v1.01 ) 8방향 스크립트 17 file 쿠쿠밥솥 2012.01.24 5412
15 전투 Sideview08 Ace 테스트 버전 (인 듯 합니다) 5 재규어 2012.01.24 4386
14 이름입력 한글 이름입력창 23 file 에틴 2012.01.23 11679
13 미니맵 미니맵 표시 스크립트 21 file 아방스 2012.01.16 6488
12 전투 XAS Hero Edition Ace Experimental 0.5 6 Alkaid 2012.01.15 6130
11 메시지 ATS: Special Message Codes 1.0 by Modern Algebra 1 file Alkaid 2012.01.15 4707
10 아이템 물품 이름 컬러 변경 14 까까까 2012.01.04 5630
9 전투 RPG VX Ace 전투 대사 한글화 37 재규어 2012.01.04 20290
8 타이틀/게임오버 코아 코스튬씨의 랜덤 타이틀 출력 스크립트를 VX Ace용으로 변환 (테스트용) 1 Alkaid 2011.12.29 3189
7 기타 Picture Gallery Ace by MogHunter 1 Alkaid 2011.12.28 3456
6 변수/스위치 TYPE74RX-T: 셀프 스위치를 실시간으로 조작 Alkaid 2011.12.23 3339
5 기타 Victor Engine 1 Alkaid 2011.12.21 4069
4 스킬 스킬 스틸 시스템 5 아르피쥐 2011.12.18 3880
3 전투 콤보 카운팅 시스템 4 아르피쥐 2011.12.18 4589
2 기타 Yanfly Engine Ace Alkaid 2011.12.10 4382
1 전투 [VX Ace] Damage Popup by Dargor 7 Alkaid 2011.12.04 5445
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11