Ace 스크립트

스크립트 :


#==============================================================================

# 8 방향 이동 스크립트                             번역 : 미루          출처 : JV Master Script

#------------------------------------------------------------------------------

# 플레이어가 8 방향으로 이동할 수 있도록 한다.

# 사선 이동 그래픽 지원.

#==============================================================================


module JvScripts

  module Dirs8

    

    Switch = 0               # 4 방향 이동과 8 방향 이동을 전환하는 스위치의 ID 를 설정

                                 # 0 일경우 항상 8 방향 이동으로 설정된다.

                                 

    DiagonalSuffix = "_di"   # 8 방향 캐릭터 그래픽 뒤에 붙는 문구 ( 접미사 ) 를 설정

                                     # 8 방향 캐릭터 그래픽의 첫번째는 수직/수평이동

                                     # 두번째는 사선이동 그래픽을 넣어주세요.

  end

end


#==============================================================================

# Game CharacterBase

#==============================================================================

class Game_CharacterBase

  

  def move_diagonal(horz, vert)

    @move_succeed = diagonal_passable?(x, y, horz, vert)

    if @move_succeed

      @x = $game_map.round_x_with_direction(@x, horz)

      @y = $game_map.round_y_with_direction(@y, vert)

      @real_x = $game_map.x_with_direction(@x, reverse_dir(horz))

      @real_y = $game_map.y_with_direction(@y, reverse_dir(vert))

      increase_steps

    end

    if diagonal_charset?

      set_direction_diagonal(horz, vert)

    else

      set_direction(horz) if @direction == reverse_dir(horz)

      set_direction(vert) if @direction == reverse_dir(vert)

    end

  end

  

  def set_direction(d)

    if !@direction_fix && d != 0

      @direction = d

      @character_index = 0 if diagonal_charset?

    end

    @stop_count = 0

  end

  

  def set_direction_diagonal(horz, vert)

    if !@direction_fix && horz != 0 && vert != 0

      if horz == 4 && vert == 2

        @direction = 2

      elsif horz == 4 && vert == 8

        @direction = 4

      elsif horz == 6 && vert == 2

        @direction = 6

      elsif horz == 6 && vert == 8

        @direction = 8

      end

      

      @character_index = 1

    end

    @stop_count = 0

  end

  

  def diagonal_charset?

    true if @character_name.include?(JvScripts::Dirs8::DiagonalSuffix)

  end

end


#==============================================================================

# Game Player

#==============================================================================

class Game_Player < Game_Character

  def move_by_input

    return if !movable? || $game_map.interpreter.running?

    if JvScripts::Dirs8::Switch > 0

      if $game_switches[JvScripts::Dirs8::Switch] == true

        case Input.dir8

        when 2, 4, 6, 8

          move_straight(Input.dir4)

        when 1

          move_diagonal(4, 2)

        when 3

          move_diagonal(6, 2)

        when 7

          move_diagonal(4, 8)

        when 9

          move_diagonal(6, 8)

        end

      else

        move_straight(Input.dir4) if Input.dir4 > 0

      end

    else

      if Input.dir8 > 0

        case Input.dir8

        when 2, 4, 6, 8

          move_straight(Input.dir4)

        when 1

          move_diagonal(4, 2)

        when 3

          move_diagonal(6, 2)

        when 7

          move_diagonal(4, 8)

        when 9

          move_diagonal(6, 8)

        end

      end

    end

  end

end

#==============================================================================






사선이동 그래픽 규격 :


Character_di.png

Who's 미루

?

< 제작한 게임 >

- 피그렛 (Piglet) [완성] : 링크 내림

- 파라딜루전 (Paradelusion) [미완성] : 링크 내림

- 주인잃은 공책 [완성] : http://avangs.info/1090264


< 연구실 홈페이지 >

http://mirulab.xo.st/


< 아방스 게임 실황 방송국 >

http://afreeca.com/miru3137

Atachment
첨부 '1'
  • ?
    포달 2013.07.11 10:50
    드디어 사선이동 환벽한게 나온건가요
  • ?
    아방님 2013.07.14 13:41
    사선이동 그래픽은 집적 만들어서 넣어야 되나요?
  • ?
    미루 2013.07.14 13:46
    네. 집적 만들어서 넣으셔야해요. ^^;;
  • ?
    아방님 2013.07.14 13:52
    제가 잘 못만들어서 그러는데 Evil캐릭터 칩에 5번째에 있는 캐릭터 사선모드좀 그려주시면 안되요? ㅠㅠ
  • ?
    미루 2013.07.14 13:56
    저도 도트는 잘 못찍고... 팔이 다쳐서, 타자치는것도 힘든 상태예요.
    공개배포되는 소재를 사용하시던가 ( 예 : http://usui.moo.jp/rpg_chadot.html [우스이의 회] )
    제작의뢰 게시판을 이용해주세요.
  • ?
    hyunseo1987 2013.08.15 10:43
    미루님이 가르쳐주신 사이트에서 의뢰를 통해 만드셨나요?
  • ?
    데스노트 2013.07.15 17:52
    마우스 스크립트랑 겹치는건 불가능한가요??
  • ?
    천년행복 2013.09.22 12:29
    으아아아아!!
    제가 그토록 찾던 사선이동 스크립트!!
    이겁니다..이거..ㅠㅠ 감사합니다!
  • profile
    2034 2014.09.16 13:41
    땡큐

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28928
217 그래픽 셰이크 강화 스크립트 file 시낵스 2023.12.13 160
216 오디오 볼륨변경 스크립트 레기우스州 2020.08.09 516
215 전투 기본전투의 커스텀 명중률 제작 안나카레리나 2018.06.10 543
214 버그픽스 RGSS3 Unofficial Bug Fix Snippets Alkaid 2015.09.09 662
213 온라인 브라우저 열기 스크립트 1 큔. 2018.09.09 674
212 기타 Gamepad Extender 습작 2015.01.02 718
211 메뉴 파티 개별 인벤토리 스크립트 안나카레리나 2018.06.25 741
210 타이틀/게임오버 GG침 스크립트 file 큔. 2018.07.18 838
209 기타 Improved Input System 1 습작 2015.01.02 976
208 버그픽스 Event Jitter Fix/Display Rounding Error Fix by Neon Black Alkaid 2013.08.31 1003
207 기타 (링크)RPG VX ACE 블랙잭 스크립트 게임애호가 2017.06.18 1004
206 맵/타일 Map Zoom Ace by MGC 습작 2016.02.28 1016
205 기타 메시지 표시 중에 자동으로 타이머 멈추기 1 file Bunny_Boy 2014.12.07 1028
204 기타 LUD Script Package file LuD 2017.08.15 1081
203 기타 '결정 키로 이벤트 시작' 조건분기 추가 file Bunny_Boy 2016.01.16 1167
202 버그픽스 Large Sprite ☆ Display Fix by Neon Black Alkaid 2014.02.08 1242
201 키입력 Improved Imput System(part of DP Core) by DiamondandPlatinum3 1 Alkaid 2014.02.12 1263
200 버그픽스 VX Ace Star Passibility Bug Fix by Neon Black 2 Alkaid 2014.02.26 1372
199 메시지 Item Choice Help Window for Ace 2 file 습작 2016.02.15 1380
198 키입력 Key Simulator by Fantasist 1 습작 2013.05.01 1388
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11