질문과 답변

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 12395
기타 파인딩 파라다이스 오류납니다ㅠㅠ 3 file 분필갈매기 2018.01.03 1281
RMXP 파일 Data/Map006.rxdata 가 발견되지 않습니다. <-- 라는 에러 어떤 경우의 에러인가요? 2 file 내손목아지 2014.02.07 904
RM2k3 파일 시스템 C를 열수 없음? 3 엑스트라 2013.01.02 889
기타 파일 첨부가 안돼요. 1 솔로몬 2011.03.13 1549
RMXP 파일로드가 안돼요; 5 file 따싯 2013.02.23 648
RMVXA 파일암호화 관련 질문드립니다. 4 l미누리l 2016.08.12 1637
RMVXA 파일열기스크립트 게임잘날아가는닝겐 2015.02.16 137
사이트 이용 파일을 업로드하려는데 실황과 이차창작에 대한 정확한 뜻을 알고싶습니다. 2 김용암 2018.01.30 176
에러 해결 RMMV 파일을 열려고 하면 프로그램이 멈춥니다. file 고르아게 2019.05.05 58
에러 해결 RMMV 파일을 열면 이렇게 되는 이유? 2 file 한글자3 2020.04.13 111
에러 해결 RMVXA 파일이 안 열려요 file 설님 2020.05.11 65
RMVX 파일이 열리지 않아 문의드립니다. 1 짱짱 2011.08.19 1326
기본툴 사용법 RMMV 파일이 적용되지 않습니다 2 file 다크샌 2023.11.26 35
스크립트 작성 RMVXA 파일이름 변경 배경 2020.07.10 58
RMVX 파일잠금하는법점.. 갈켜주세요 2 미남뒈지 2010.12.19 792
RMMV 파티 그룹원추가문제. file the추장 2016.05.03 137
이벤트 작성 RMMV 파티 내 액터중 이름, 직업이 일치하는 경우에만 특정 이벤트를 표현하고자 합니다. 6 애용애용갱얼쥐 2022.12.30 85
RMVXA 파티 멤버 변수 저장 스크립트 질문입니다. 4 귀칸 2014.10.19 468
RMVXA 파티 멤버에 추가하려는 파티원의 레벨을 미리 지정해놓는 방법은 없나요? 2 바크지누크 2014.08.03 611
RMXP 파티 인원 문의 2 부리얌 2012.01.05 3226
Board Pagination Prev 1 ... 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 ... 516 Next
/ 516