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 5408
77 기타 Gamepad Extender VX 습작 2015.01.02 672
76 기타 Fullscreen++ by Zeus81 (VX/VXA) 2 Alkaid 2012.09.01 2230
75 상태/속성 Full Status CMS 1.0d by Modern Algebra 1 file Alkaid 2010.09.03 2408
74 전투 Fomars indiviivdual battle 2 Man... 2008.10.28 1340
73 fog[안개] 효과 43 file RPGbooster 2008.10.08 4196
72 메뉴 Final Fantasy VII Menu System 8 비극ㆍ 2010.04.19 3506
71 맵/타일 Final Fantasy IV 모든 완성된맵 47 RPGbooster 2008.10.11 5086
70 장비 Expansion_Suite V2.1! 6 Man... 2008.10.25 1593
69 변수/스위치 Etude87_Variables_VX 1 file 습작 2011.11.26 2608
68 전투 Etude87_Tankentai_Addon ver.1.0 7 file 습작 2012.06.03 2882
67 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2430
66 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1771
65 이름입력 Etude87_HG_Hangul_Name_Scene file 습작 2012.06.14 1948
64 기타 Etude87_Hangul_utf8_List 습작 2012.06.04 1665
63 기타 Etude87_GAGA_Chat 4 습작 2012.06.14 1916
62 메뉴 Etude87_Ace_Style_Formation_Change ver.1.01 습작 2014.10.05 758
61 메뉴 Etude87's Menu Editor for VX 25 습작 2015.01.14 1461
60 메시지 Etude87 Dialogue History Scene file 습작 2014.07.07 1070
59 ES Character Info 6 file RPGbooster 2008.10.08 1824
58 장비 Equipment Set Bonus 6 Man... 2008.10.25 1849
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