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 6659
77 액알 스크립트 33 츠키아 2008.08.11 5832
76 체력 게이지바 스크립트 30 아방스 2008.09.01 5850
75 전투 지형에 따른 전투배경화면 표시 스크립트!! 30 file 레오 2008.09.17 5878
74 기타 빛 이펙트 71 file DEVIL<Li Patanis Roni Kraudus> 2008.06.06 5884
73 메뉴 창 크기 변경 스크립트 6 file Incubus 2008.05.25 5963
72 전투 ActBattle 전투 스크립트 13 file 사람이라면? 2010.08.16 5994
71 기타 작은 게이지바 표시 스크립트 44 file 허걱 2009.02.05 6002
70 메시지 대화창효과 8 078656577er 2009.10.20 6030
69 파티 대규모파티 KGC스크립 50 file RPGbooster 2008.10.08 6042
68 전투 포켓몬 스크립트 한글화 완료 26 file 서울냥이 2010.10.11 6048
67 스킬 합성샾 스크립트 ^^ [동영상 포함] 6 file 아방스 2008.09.23 6061
66 기타 캐릭터 소개화면 16 file 좀비사냥꾼 2009.03.29 6082
65 퀘스트 디아블로 스타일 퀘스트 시스템(번역) 38 file 훈덕 2009.02.03 6087
64 몬스터 도감 [수정] 68 file RPGbooster 2008.10.08 6118
63 기타 게임시간&밤낮 54 file 허걱 2009.02.14 6137
62 풍선대화 메세지시스템 32 file RPGbooster 2008.10.11 6143
61 맵/타일 월드맵 스크립트 49 아방스 2008.09.07 6153
60 전투 GTBS 1.0 [스크립트] 24 아방스 2009.02.05 6155
59 퀘스트 퀘스트 스크립트 39 file RPGbooster 2008.10.11 6163
58 타이틀/게임오버 타이틀화면 커스터마이즈 29 file 可わいい 2009.03.16 6177
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