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 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28925
97 전투 SRPG 컨버터 for Ace (SRPGコンバータ for Ace) by AD.Bank 27 file 습작 2012.04.17 7274
96 HUD SpriteIcon - 화면에 아이콘 그리기 4 file 허걱 2013.02.24 3630
95 전투 SPRG 컨버터 NEXT 1 file 게임애호가 2016.06.09 1905
94 스킬 Skill Cost Manager - Yanfly 4 file Rondo 2013.04.09 2607
93 변수/스위치 Simple self switches(간단한 셀프 스위치) 4 한국사수련생 2013.10.04 1433
92 전투 Sideview08 Ace 테스트 버전 (인 듯 합니다) 5 재규어 2012.01.24 4386
91 상점 Shop Stock < 상점에서 판매하는 아이템의 수량 제한 > 2 file 스리아씨 2013.09.26 1876
90 변수/스위치 Self_Variables (셀프 변수 시스템) 16 file 허걱 2012.12.17 2293
89 전투 Schala 전투 시스템 (XAS에 의해 구동) 11 홍색의환상향 2013.05.05 5321
88 저장 Scene_File Comfirmation by JohnBolton Alkaid 2013.02.13 2409
87 기타 Sapphire Action System IV v4.4br(엑알 스크립트) 6 file 꿈꾸는사람 2012.08.02 4516
86 전투 RPG VX Ace 전투 대사 한글화 37 재규어 2012.01.04 20291
» 이동 및 탈것 RPG VX ACE ( RGSS3_8direction_move_v1.01 ) 8방향 스크립트 17 file 쿠쿠밥솥 2012.01.24 5412
84 상태/속성 RGSS3_스테이터스 표시 확장(추가) by tomoaky 4 file 아이미르 2013.01.03 3972
83 버그픽스 RGSS3 Unofficial Bug Fix Snippets Alkaid 2015.09.09 662
82 키입력 RGSS3 Input Full + UTF-8 Input by Cidiomar 1 Alkaid 2012.09.08 2434
81 그래픽 RGSS3 - CompositeGraphics 1 file 쿠쿠밥솥 2014.01.17 2610
80 HUD ReinoRpg Hudre 5 file 스리아씨 2013.09.22 2786
79 기타 regendo - MenuScreen While Message 혜인 2014.01.23 1412
78 전투 Ra TBS Alpha by Eshra 1 file 습작 2013.05.13 3856
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11