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
617 장비 방어구 착용시 최대HP, MP증가 스크립트(턴알) 3 file 기관차 2014.11.06 1222
616 Jens009's Critical Flash 1.0 3 Man... 2008.10.27 1240
615 전투 Verus Tempus Proelium by Vlad 습작 2013.05.13 1242
614 디러그 시스템?? 1 Man... 2008.10.28 1247
613 Detailed Call Script Error Mesage 3 Man... 2008.10.28 1258
612 키입력 해외 제작자 He Who Jets님의 마우스 스크립트(mouse system) 1 file 보자기군 2014.09.30 1261
611 Khai's Window Helper 1.4 1 Man... 2008.10.28 1272
610 버그픽스 애니메이션 표시 위치 수정 (Fix Animation Position) 2 file AltusZeon 2014.02.12 1288
609 맵/타일 SwapXT by bulletxt 습작 2013.05.13 1292
608 Attribute System Man... 2008.10.28 1293
» 컴퓨스트 플레이어 워크(?) 2 Man... 2008.10.27 1304
606 기타 VX Weather Script by ccoa 1 Alkaid 2010.09.08 1317
605 ??무슨 스크립트?? 3 Man... 2008.10.27 1323
604 변수/스위치 MapSwitch VX Version: 1.1 1 Man... 2008.10.27 1327
603 ??? 2 Man... 2008.10.27 1329
602 기타 reijubv - New Balloon Command (VXA에서도 작동) 1 file 혜인 2013.04.08 1332
601 전투 Fomars indiviivdual battle 2 Man... 2008.10.28 1339
600 기타 MSX - XP Characters on VX/VX Ace 2 Alkaid 2013.01.26 1345
599 기타 Resize and Scale by OriginalWij 1 습작 2013.05.13 1349
598 기타 페이드 시간 변경 2 rukan 2009.07.01 1360
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32