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 28921
217 전투 스킬 캐스팅 시스템 3 스리아씨 2013.10.12 32150
216 전투 RPG VX Ace 전투 대사 한글화 37 재규어 2012.01.04 20290
215 전투 Yanfly 엔진 - 몬스터의 레벨 설정 6 file 스리아씨 2013.11.08 13003
214 이름입력 한글 이름입력창 23 file 에틴 2012.01.23 11679
213 기타 Dialog Extractor 1.04 (VXA/VX/XP) 6 AltusZeon 2014.01.16 11664
212 기타 원하는 글씨체로 변경하기 12 조말생 2012.04.20 8847
211 이름입력 전체키 + 조합한글 + 이름입력처리 변경 47 file 허걱 2012.07.04 8197
210 전투 vx ace 애니메이션 배틀 3 gor 2012.05.27 7663
209 전투 SRPG 컨버터 for Ace (SRPGコンバータ for Ace) by AD.Bank 27 file 습작 2012.04.17 7274
208 메시지 [스크립트] Ace Message System - by. Yanfly 17 file 허걱 2012.05.21 7252
207 그래픽 [ACE][BR] Awesome Light Effects 1.0(빛관련 스크립트) 37 file 꿈꾸는사람 2012.08.02 7012
206 메뉴 Etude87's Menu Editor 44 file 습작 2014.07.17 6992
205 전투 [스크립트] Sideview Battle System ver. 1.00 (일본어) 7 file 허걱 2012.05.20 6912
204 제작도구 VXAce HUD Designer by Cidiomar R. Dias Jr 1 file 습작 2013.01.19 6761
203 메뉴 [VX Ace] 다이얼 링 메뉴 스크립트 8 file RaonHank 2012.04.16 6670
202 스킬 VXACE 패시브 스킬 스크립트 Ver. 0.82 21 file 아이미르 2012.03.07 6669
201 장비 사용자 장비 슬롯 1.1 27 file 아방스 2012.01.31 6615
200 미니맵 미니맵 표시 스크립트 21 file 아방스 2012.01.16 6488
199 전투 VXAce 사이드뷰 스크립트 (번역) 23 아이미르 2012.12.10 6355
198 전투 XAS Hero Edition Ace Experimental 0.5 6 Alkaid 2012.01.15 6129
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11