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 5398
37 타이틀/게임오버 코아 코스튬씨의 랜덤 타이틀 스크립트를 VX용으로 변환 2 Alkaid 2012.09.14 1704
36 메시지 문장 및 페이스 정렬 바꾸기 (Neonblack's Text Alignment and Face Flip script) MinaAubert 2012.09.19 2214
35 영상 Avi 재생 스크립트! [고화질 재생 가능] 34 짭뿌C 2012.10.24 2952
34 장비 카드 슬롯 장비 스크립트[수정] 2 빙하 2012.11.11 2058
33 파티 파티원의 첫번째 멤버로 추가하기 5 허걱 2012.12.04 1865
32 기타 MSX - XP Characters on VX/VX Ace 2 Alkaid 2013.01.26 1346
31 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1771
30 기타 reijubv - New Balloon Command (VXA에서도 작동) 1 file 혜인 2013.04.08 1332
29 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 1046
28 키입력 Key Simulator by Fantasist 습작 2013.05.01 1176
27 이동 및 탈것 장소이동시 효과 없애기 10 file 허걱 2013.05.05 1960
26 전투 Verus Tempus Proelium by Vlad 습작 2013.05.13 1243
25 전투 Requiem ABS Hero Edition by Falcao 습작 2013.05.13 2005
24 기타 Resize and Scale by OriginalWij 1 습작 2013.05.13 1349
23 맵/타일 SwapXT by bulletxt 습작 2013.05.13 1292
22 전투 VX_SRPG2 by tomoaky 1 습작 2013.05.13 2050
21 전투 GTBS for 2d_iso_x3 by Clarabel 2 습작 2013.05.13 1879
20 전투 SRPGコンバータ for VX by AD.Bank 습작 2013.05.13 2970
19 HUD 아방스님이 올린 HUD를 개조했습니다. 7 file 스리아씨 2013.09.30 2684
18 전투 [RPG VX]기술에 쿨타임을 부여하는 스크립트 3 스리아씨 2013.12.05 2348
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