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
217 기타 '결정 키로 이벤트 시작' 조건분기 추가 file Bunny_Boy 2016.01.16 1165
216 기타 (링크)RPG VX ACE 블랙잭 스크립트 게임애호가 2017.06.18 1003
215 기타 77er 월드 맵 1.0 by 77er 3 file 77ER. 2013.08.14 2281
214 이동 및 탈것 8 방향 이동 스크립트 ( 사선 이동 캐릭터 그래픽 지원 ) 9 file 미루 2013.07.11 4845
213 전투 Ace 경험치 직접 설정 12 쿠쿠밥솥 2012.02.05 4004
212 장비 Ace 장비 착용의 제한 스크립트 11 아이미르 2012.09.01 2786
211 기타 ACE) 오블리비언 락픽 구현 V0.5.2 7 file 77이알 2012.09.02 4811
210 기타 ACE) 캐릭터 사전 by 77ER 19 77이알 2012.09.17 3937
209 메뉴 ace용 mog메뉴와 mog전투 10 file 꿈꾸는사람 2012.08.04 6052
208 액터 Actor Creation System by Tsukihime 4 Alkaid 2012.09.16 3552
207 메시지 Advanced Text System by modern algebra 2 Alkaid 2013.02.04 2316
206 메시지 ATS: Special Message Codes 1.0 by Modern Algebra 1 file Alkaid 2012.01.15 4707
205 오디오 Audio Pump Up: FMOD Ex by mikb89 2 Alkaid 2012.09.08 2071
204 전투 Basic Enemy HP Bars 2.1 by V.M 10 Alkaid 2013.02.21 4206
203 전투 Code Crush VXAce-RGSS3-21 프론트뷰 改 2 15 Alkaid 2013.01.28 4270
202 전투 CP's Battle Engine by Neon Black 20 Alkaid 2013.02.14 4957
201 퀘스트 CSCA]콜로세움 시스템 4 file 글쎄,왜 난 적용이 안될까? 2013.06.09 3623
200 메뉴 Customizable Main Menu 1.0b by modern algebra 4 file Alkaid 2012.02.13 5450
199 기타 Dialog Extractor 1.04 (VXA/VX/XP) 6 AltusZeon 2014.01.16 11668
198 전투 Drop Options by modern algebra 3 Alkaid 2012.09.17 2851
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11