질문과 답변

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 12391
RMVX 파티선택하는법 3 동화같은이야기 2013.09.04 840
RMVXA 파티선두 캐릭터 ID 변수 취득 은호 2014.06.15 458
RMMV 파티상태에서 전투에 나오지 않는 방법 4 만죠메군 2018.08.25 108
RMMV 파티별 아이템 구분 2 시풍 2018.01.17 92
RMVXA 파티목록 호출 2 하얀솜털 2013.10.18 990
RMXP 파티멤버가 자동으로 싸우게 하려면 어떻게 해야 할 까요? 5 아미상 2012.08.29 1587
기타 파티맺고 맵을 같이 돌아다니는방법 !!! ㅠㅠ 1 초보초보초보초보짱 2014.02.06 743
RMVXA 파티맴버 수가 5명이 되면 1번 액터에게 상태를 부여하게 하고싶습니다. 2 기폭 2016.01.09 250
RMVXA 파티를 맺은 후 일체화 시키는 2 Fostree 2015.02.16 150
RMVXA 파티내의 맴버중에 이벤트에 가담할 맴버를 바꾸는건 어찌해야할까요? 1 메이133 2014.01.13 830
기타 RMMV 파티 합류 자연스럽게 하는 방법 어떻게 하나요? 2 문정 2019.07.06 117
RMVXA 파티 캐릭터 들이 줄줄이 따라오는 스크립트 어떻게 지우죠? 3 비극의 공연 2012.01.14 2752
RMXP 파티 인원 문의 2 부리얌 2012.01.05 3226
RMVXA 파티 멤버에 추가하려는 파티원의 레벨을 미리 지정해놓는 방법은 없나요? 2 바크지누크 2014.08.03 611
RMVXA 파티 멤버 변수 저장 스크립트 질문입니다. 4 귀칸 2014.10.19 468
이벤트 작성 RMMV 파티 내 액터중 이름, 직업이 일치하는 경우에만 특정 이벤트를 표현하고자 합니다. 6 애용애용갱얼쥐 2022.12.30 81
RMMV 파티 그룹원추가문제. file the추장 2016.05.03 137
RMVX 파일잠금하는법점.. 갈켜주세요 2 미남뒈지 2010.12.19 792
스크립트 작성 RMVXA 파일이름 변경 배경 2020.07.10 58
기본툴 사용법 RMMV 파일이 적용되지 않습니다 2 file 다크샌 2023.11.26 34
Board Pagination Prev 1 ... 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ... 516 Next
/ 516