질문과 답변

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 12451
게임찾기 "보코의 농장"이란 게임 갖고있는분 찾습니다 2 A.미스릴 2013.04.27 2223
기타 tps게임에 도전하려는데요 스네이크 2011.07.31 2224
RMXP 자동 가로등 1 솔로몬 2011.12.03 2224
RMVX 캐릭이 3 초보닼ㅋㅋㅋㅋㅋㅋㅋㅋ 2012.03.30 2225
RMXP GTBS 에서 스킬쓸때 질문이요 1 황제님 2010.09.11 2226
RMVX 전투후 해당 적 이벤트가 사라지게 하는법좀 알려주세요 3 file 김만들기 2011.11.02 2228
RMVX 이벤트가 계속 반복됩니다. 3 블루스 2012.02.18 2232
RMVXA 선택지 표시 위치 변경 5 file lallal 2013.01.06 2237
RMXP RPG XP에서 avi파일 재생할수 있는 방법좀여 ㅜ 2 ☆star 2012.09.17 2239
RMVXA 테스트 플레이 도중 렉이 걸립니다. 3 난현이라는 2012.03.17 2240
RMXP rpgxp공격력 5 gusrl123 2012.02.20 2241
RMVX window7 연결프로그램 2 푸른초원 2011.10.25 2242
RMXP 액터캐릭터의 통제권 4 Lighna 2012.02.07 2244
에러 해결 RMVXA RPGVXAce 에러 해결방법좀 알려주세요... 21 file KangHG 2019.02.28 2247
RMVXA srpg 한글화 된 파일없나요? 1 ky2399 2012.03.01 2248
RMXP 게임오버 화면을 넣고 싶은데.. 게임오버타이틀에 넣어도 안뜨네요. 3 file aggelos 2011.11.19 2249
RMVX 게임이 너무 늦게켜지네요; 3 초보제작가뉴센 2012.03.16 2250
RMVX 윈7에서 실행되지 않는 VX 2 file 슈베르트1123 2012.03.31 2250
RMVX 말걸때마다 랜덤으로 다른대화가 뜨도록 3 춰억헐릿 2012.05.18 2251
RMXP 맵배치 1 i스폰지밥 2012.02.16 2252
Board Pagination Prev 1 ... 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 ... 516 Next
/ 516