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 풍선대화 메세지시스템 32 file RPGbooster 2008.10.11 6126
616 폴스 세이브 4 Man... 2008.10.28 2343
615 폰 시스템 29 RPGbooster 2008.10.11 3454
614 전투 포켓몬 스크립트 한글화 완료 26 file 서울냥이 2010.10.11 6030
613 아이템 편리한 디자인의 아이템메뉴 30 file RPGbooster 2008.10.11 5098
612 기타 페이드 시간 변경 2 rukan 2009.07.01 1360
611 퍼스 스크립트 5 Man... 2008.10.28 1679
610 파티 파티원이 따라다니는 스크립트 11 file 놀러 2011.09.15 3988
609 파티 파티원의 첫번째 멤버로 추가하기 5 허걱 2012.12.04 1865
608 파티 파티 체인저 3.4 최신 13 file RPGbooster 2008.10.08 3864
607 파티 파티 변경 시스템 21 file 아방스 2008.03.09 3945
606 전투 파이널 판타지 XIII 배틀 시스템 [출처:RRR포럼] 56 file WolV 2010.02.03 6795
605 메뉴 파이날 판타지 IX 메뉴. 12 file 할렘 2009.02.06 6286
604 변수/스위치 특정 키눌러서 스위치 온 시키는 스크립트 7 아방이 2008.01.30 2608
603 기타 통합 스크립트(좋은 마우스 스크립트 좋은거),KGC좋은거 새로운 거 스크립트 세이브 스크립트 좋은거!~~~~~ 14 알피지GM 2010.03.07 3829
602 그래픽 토마스 에디슨(파티클 엔진 비슷) 9 file 비극ㆍ 2010.04.19 3432
601 기타 텍스트 파일 읽어 오는 스크립트 11 아방스 2008.03.04 2878
600 기타 태양 스크립트. 15 file 할렘 2009.02.20 4463
599 이동 및 탈것 탈것탑승후 내부로 이동하는 스크립트 16 file 카르와푸딩의아틀리에 2009.07.01 3268
598 탈것을 소환 12 file RPGbooster 2008.10.08 2713
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