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 그래픽 커스텀 아이콘 적용하기 2 file 간로 2015.09.28 2721
16 기타 '결정 키로 이벤트 시작' 조건분기 추가 file Bunny_Boy 2016.01.16 1165
15 메시지 Item Choice Help Window for Ace 2 file 습작 2016.02.15 1379
14 맵/타일 Map Zoom Ace by MGC 습작 2016.02.28 1015
13 전투 Tomoaky's RGSS3_SRPG ver.0.15a 한국어번역 3 file 초코빙수 2016.06.05 2071
12 전투 SPRG 컨버터 NEXT 1 file 게임애호가 2016.06.09 1905
11 기타 (링크)RPG VX ACE 블랙잭 스크립트 게임애호가 2017.06.18 1002
10 HUD 아이템 레어리티 스크립트 (번역기 돌림) 2 file 부초 2017.07.21 1424
9 맵/타일 레이어 맵 <layer> 기능 2 file LuD 2017.08.03 1469
8 기타 LUD Script Package file LuD 2017.08.15 1079
7 전투 기본전투의 커스텀 명중률 제작 안나카레리나 2018.06.10 543
6 메뉴 파티 개별 인벤토리 스크립트 안나카레리나 2018.06.25 738
5 타이틀/게임오버 GG침 스크립트 file 큔. 2018.07.18 835
4 온라인 브라우저 열기 스크립트 1 큔. 2018.09.09 671
3 전투 LNX11 전투 RPGXP 전투처럼 만들기 큔. 2018.11.23 1443
2 오디오 볼륨변경 스크립트 레기우스州 2020.08.09 504
1 그래픽 셰이크 강화 스크립트 file 시낵스 2023.12.13 92
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11