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
177 MAX Level Limitation System 3 Man... 2008.10.28 1198
176 Menu Background Effects(온라인 스크립트 올릴려고 했다가 못 올렸음)아깝다.. Man... 2008.10.28 1665
175 레오 저장 스크립트 9 Man... 2008.10.28 2529
174 Skill Delay VX 4 Man... 2008.10.28 1503
173 아이템 ~[Hide Item]~ Man... 2008.10.27 1597
172 (?스크립트) 스크립트 읽어서 그래픽 넣으세요.(영어 잘하는 사람만 권장...) 2 Man... 2008.10.27 1444
171 Sprite Mover 2 Man... 2008.10.27 1529
170 변수/스위치 MapSwitch VX Version: 1.1 1 Man... 2008.10.27 1327
» 컴퓨스트 플레이어 워크(?) 2 Man... 2008.10.27 1304
168 Jens009's Critical Flash 1.0 3 Man... 2008.10.27 1240
167 LevelMe v1.2 3 Man... 2008.10.27 1154
166 Scene_Credit script Plug & Play 1 Man... 2008.10.27 1085
165 다운로드 링크로 가세요.(스크린 샷 올려놨음) 5 Man... 2008.10.27 1618
164 Screen Shortcut Script Man... 2008.10.27 1142
163 AutoLight v3.7(?) 6 Man... 2008.10.27 1646
162 ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
161 ??? 2 Man... 2008.10.27 1329
160 ??? 1 Man... 2008.10.27 1020
159 ??무슨 스크립트?? 3 Man... 2008.10.27 1323
158 영어 잘하는 사람만 보세요..저도 모르겠음(무슨 스크립트인지) 3 Man... 2008.10.27 1372
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