VX 스크립트

#===============================================================================
# Earthbound Confusion Walk Script
#    Max
#    rainkimahri@gmail.com
# This script will test to see if an Actor is confused, and, if so, it will
#  change the controls for movement rotating them randomly.
#===============================================================================
class Game_Player < Game_Character
  @maxtemp = 0
  alias max_move_by_input :move_by_input
  def move_by_input
    return unless movable?
    return if $game_map.interpreter.running?
#Here, 001 is the Actor ID of the
#party member I'm checking for confusion
      if $game_actors.[](001).confusion?
          case @maxtemp
          when 0
            case Input.dir4
            when 2;  move_down
            when 4;  move_left
            when 6;  move_right
            when 8;  move_up
            end
          when 1
            case Input.dir4
            when 4;  move_down
            when 8;  move_left
            when 2;  move_right
            when 6;  move_up
            end
          when 2
            case Input.dir4
            when 8;  move_down
            when 6;  move_left
            when 4;  move_right
            when 2;  move_up
            end
          when 3
            case Input.dir4
            when 6;  move_down
            when 2;  move_left
            when 8;  move_right
            when 4;  move_up
            end
          end
          if Input.dir4 != 0
#Here, 10 means 10% chance on player walk
#that the direction keys rotate
            if rand(100) <= 10
            @maxtemp = rand(4)
            end
          end
      else
            case Input.dir4
            when 2;  move_down
            when 4;  move_left
            when 6;  move_right
            when 8;  move_up
            end
      end
      max_move_by_input    
    end
end

class Game_Battler
attr_accessor :hidden
  alias max_confusion? :confusion?
  def confusion?
    return (not @hidden and restriction == 3)
    max_confusion?
  end
end
Comment '2'
  • ?
    크라상 2009.01.14 19:31
    제발 설명좀 적어주시죠?ㅜㅜ
  • ?
    훈덕 2009.01.25 00:53
    혼란당했을때 방향이 틀려진다는거 같네요...

    이분은 자기도 모르는데 그냥 막 퍼오시는듯...

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 6661
177 메뉴 CogWheelBars 시스템. 13 file 할렘 2009.02.20 4406
176 이름입력 한글 이름 입력 스크립트입니다.^^ 14 레시온 2008.03.18 4413
175 맵/타일 ◆ 타일 세트 확장 스크립트 [업데이트 수정] 24 file 아방이 2008.01.30 4418
174 메시지 조합한글 21 file 허걱 2009.06.27 4440
173 타이틀/게임오버 [자작] 타이틀 화면 없이 게임을 시작하자! Title Skiper 29 케류 2009.04.05 4441
172 기타 글씨표시 스크립트 32 file 허걱 2009.08.10 4448
171 HUD 아이콘 그리기 7 file 허걱 2009.08.20 4466
170 제작도구 게임제작에 필수인 테스트 플레이 고속화 스크립트! ! ! ! 25 양념통닼 2008.05.30 4467
169 저장 [퍼옴] Neo_Save_System ver.1.0 10 레오 2008.06.14 4478
168 레벨업 할경우 hp/mp 등을 채워주는 스크립트 49 아방스 2008.09.09 4478
167 기타 로딩중 스크립트 24 file NO.0 2009.07.11 4480
166 기타 태양 스크립트. 15 file 할렘 2009.02.20 4483
165 장비 Rei(레이)의 Paperdoll(비쥬얼 장비)스크립트 20 file 루시페르 2009.07.29 4492
164 전투 GTBS 1.5.1.4 - GubiD's Tactical Battle System 10 아방스 2010.12.11 4495
163 전투 sbs battler configuration 한글 번역 13 file 시트르산 2010.09.23 4499
162 이동 및 탈것 VX 기차 스크립트 28 아방스 2009.01.13 4500
161 기타 책 읽기 스크립트. 19 허걱 2009.01.31 4506
160 상점 스킬합성 상점 스크립트 23 file 미얼 2009.10.29 4523
159 기타 책 읽기 스크립트 44 file 히류 2010.10.05 4526
158 전투 Target 몬스터 플래시 스크립트 16 아방스 2008.01.24 4538
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32