질문과 답변

Extra Form

현재 파티에 있는 멤버의 액터 아이디를 취득해서 변수로  저장을시켰는데


이 취득한 수치의 해당 멤버의 능력이나 착용장비를 분기로 사용하고 싶은데 분기에서는


멤버를 변수로 선택하는 항목이 없어서 분기를 스크립트로 해야할거 같은데 스크립트 까막눈이라


관련 스크립트좀 알려주시면 감사하겠습니다.


고수님들의 도움이 절실합니다.

Comment '4'
  • profile
    러닝은빛 2014.10.20 00:02

    아예 필요에 따라 조건 분기 스크립트를 변경해서 사용하시는 건 어떻습니까?


    조건 분기도... 스크립트에서 처리되는데 그 처리 구문이 스크립트 에디터에 정의되어있습니다.


    그래서 원하는 대로 바꿀 수 있습니다.


    아래 스크립트를 소재 밑에 추가하면 됩니다.


    액터의 번호가 있는 변수의 번호를 아래 굵은 부분에 넣어주시면 조건 분기를 질문자님께서 원하는 방향으로 사용하실 수 있습니다.


    기존에 액터를 고를 수 있는 부분만 무시하시고 쓰면 됩니다. 액터를 골라도 어차피 액터의 번호가 저장되어있는 변수의 값으로 골라집니다.




    class Game_Interpreter

      def command_111

        result = false

        case @params[0]

        when 0  # Switch

          result = ($game_switches[@params[1]] == (@params[2] == 0))

        when 1  # Variable

          value1 = $game_variables[@params[1]]

          if @params[2] == 0

            value2 = @params[3]

          else

            value2 = $game_variables[@params[3]]

          end

          case @params[4]

          when 0  # value1 is equal to value2

            result = (value1 == value2)

          when 1  # value1 is greater than or equal to value2

            result = (value1 >= value2)

          when 2  # value1 is less than or equal to value2

            result = (value1 <= value2)

          when 3  # value1 is greater than value2

            result = (value1 > value2)

          when 4  # value1 is less than value2

            result = (value1 < value2)

          when 5  # value1 is not equal to value2

            result = (value1 != value2)

          end

        when 2  # Self switch

          if @event_id > 0

            key = [@map_id, @event_id, @params[1]]

            result = ($game_self_switches[key] == (@params[2] == 0))

          end

        when 3  # Timer

          if $game_timer.working?

            if @params[2] == 0

              result = ($game_timer.sec >= @params[1])

            else

              result = ($game_timer.sec <= @params[1])

            end

          end

        when 4  # Actor

          actor = $game_actors[[1,$game_variables[100]].max]

          if actor

            case @params[2]

            when 0  # in party

              result = ($game_party.members.include?(actor))

            when 1  # name

              result = (actor.name == @params[3])

            when 2  # Class

              result = (actor.class_id == @params[3])

            when 3  # Skills

              result = (actor.skill_learn?($data_skills[@params[3]]))

            when 4  # Weapons

              result = (actor.weapons.include?($data_weapons[@params[3]]))

            when 5  # Armors

              result = (actor.armors.include?($data_armors[@params[3]]))

            when 6  # States

              result = (actor.state?(@params[3]))

            end

          end

        when 5  # Enemy

          enemy = $game_troop.members[@params[1]]

          if enemy

            case @params[2]

            when 0  # appear

              result = (enemy.alive?)

            when 1  # state

              result = (enemy.state?(@params[3]))

            end

          end

        when 6  # Character

          character = get_character(@params[1])

          if character

            result = (character.direction == @params[2])

          end

        when 7  # Gold

          case @params[2]

          when 0  # Greater than or equal to

            result = ($game_party.gold >= @params[1])

          when 1  # Less than or equal to

            result = ($game_party.gold <= @params[1])

          when 2  # Less than

            result = ($game_party.gold < @params[1])

          end

        when 8  # Item

          result = $game_party.has_item?($data_items[@params[1]])

        when 9  # Weapon

          result = $game_party.has_item?($data_weapons[@params[1]], @params[2])

        when 10  # Armor

          result = $game_party.has_item?($data_armors[@params[1]], @params[2])

        when 11  # Button

          result = Input.press?(@params[1])

        when 12  # Script

          result = eval(@params[1])

        when 13  # Vehicle

          result = ($game_player.vehicle == $game_map.vehicles[@params[1]])

        end

        @branch[@indent] = result

        command_skip if !@branch[@indent]

      end

    end




  • ?
    귀칸 2014.10.20 12:47
    오오옷!감사합니다!
    크으 드디어 일일히 설정하던 조건분기 지옥에서 벗어날수 있겠군요 ㅠㅠ
    정말 다시 한번 감사의 말 드립니다.
  • ?
    귀칸 2014.10.20 13:21
    으으 기존의 분기들로만 하려니 제약이 너무 많네요..
    해당 멤버의 파타메터도 계산하고 변경도 해야하는데...
    다시 찾아봐야겠네요 ㅜ
  • profile
    러닝은빛 2014.10.20 15:29
    새롭게 올리신 질문에 답변을 달았습니다.

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 21138
RMVX 보행 그래픽 질문이요~ 2 file Tamasi 2011.12.08 2212
RMXP ABS좀올려주세요 ㅇㅅㅇ 3 라이토스 2011.12.20 2212
RMVXA 메시지 박스 (대화창) 자기 그림으로 설정 하는 방법 질문이요 5 file 여미형님 2014.09.12 2212
RMVX rpgvx배틀러칩 사이즈 3 현사이 2012.03.06 2213
RMXP 해석좀욧 2 Amaster 2011.12.15 2214
RMVX 특정 메뉴에서 아이콘 크기 조절하는 방법을 알려주세요 mits 2012.02.01 2214
RMXP 진위값(true,false) true, false로 스크립트로 불러오는 방법 ㅜㅜ Tattoo 2011.08.01 2215
RMVX 사이드뷰 캐릭터 배틀칩크기를 변경하고싶습니다. 4 file 무명시대 2013.02.21 2215
RMVX vx + 관련해서 질문입니다. 아방스님께라고 해야할까나.. 2 자선1 2011.11.15 2217
RMXP 못 뜯게하기 7 s하늘군s 2012.01.28 2218
RMVXA 액터의 능력치를 스크립트로 조정 가능한가요? 4 차진스 2012.03.13 2218
RMVX VX) 한정퀘스트를 만들고싶은데요 4 한줄노트 2011.10.31 2219
RMXP 이밴트,커먼이밴트만 대기 2 EXCELBREAKERS 2012.01.18 2219
RMXP 문장의 표시에서 파티의 맨 앞 액터의 이름 표시하기 2 알카데스 2012.03.02 2220
RMVX 스킬쿨타임 하는방법 자세히 가르쳐주세요 2 냐catch 2012.03.30 2221
RMXP 내용찼는방법 3 오매갓 2011.11.12 2222
RMXP 액알모션 만드는 법 까멸 2011.12.13 2223
RMXP 스킬 아이콘 크기제한 변경 2 MH 2011.08.08 2224
RMVXA rpg만들기 vx ace에서 4*4 액터 사용하는법 5 난현이라는 2012.02.28 2225
RMXP 타이틀화면 2 블러키 2011.03.23 2226
Board Pagination Prev 1 ... 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 ... 518 Next
/ 518