질문과 답변

Extra Form
srpg

버튼B를 (키보드상 x)
눌러도 창이 안닫혀 커맨드 윈도우 선택지에서 
명령을 하나 늘려서 닫으려 합니다.
'when 2 # 취소' 어떤 명령어가 들어가야 
작동을 하게 될까요? 아니면 종료 처리쪽의 문제일까요?
혹 다른 방법이 있으시면  가르쳐주십쇼

class TSrpg_Edit_Scene < Scene_Base
  #--------------------------------------------------------------------------
  # ● 공개 인스턴스 변수
  #--------------------------------------------------------------------------
  attr_reader :member_max
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize(map_id)
    @map_id = map_id
    if $data_mapinfos[map_id].name =~ TSRPG::Pattern::SRPG
#    if $data_mapinfos[$game_map.map_id].name =~ TSRPG::Pattern::SRPG
      @member_max = $1.to_i
    end
    
  end
  #--------------------------------------------------------------------------
  # ● 개시 처리
  #--------------------------------------------------------------------------
  def start
    super
    $game_temp.srpg_member = []       # 부대 배열의 초기화
    # 자동전투 캐릭터를 부대에 추가
#    for i in 0...$game_party.members.size
    for i in 0...$game_party.battle_members.size
      if $game_party.members[i].auto_battle and $game_temp.srpg_member.size < @member_max
        $game_temp.srpg_member.push(i)
      end
    end
    # 맵 ID에 강제 출격 설정되어 있는 캐릭터를 부대에 추가
    if TSRPG::Options::MAP_ACTOR[@map_id] != nil
#      for i in 0...$game_party.members.size
      for i in 0...$game_party.battle_members.size
        if TSRPG::Options::MAP_ACTOR[@map_id].include?($game_party.members[i].id)
          $game_temp.srpg_member.push(i)
        end
      end
    end
    create_menu_background            # 배경의 작성
    @help_window = Window_Help.new
    create_command_window
    @character_window = TRts_Window_Character.new(272, 56, 272, 360, @map_id)
    @character_window.help_window = @help_window
    @status_window = TRts_Window_Status.new(0, 136, @map_id)
  end
  #--------------------------------------------------------------------------
  # ● 커맨드 윈도우의 작성
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "부대편성"
    s2 = "출격"
    s3 = "취소"
    @command_window = TRts_Window_Command.new(272, [s1, s2, s3])
    @command_window.index = 0
    @command_window.y = 56
    @command_window.active = true
    @command_window.help_window = @help_window
  end
  #--------------------------------------------------------------------------
  # ● 종료 처리
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    @command_window.dispose
    @character_window.dispose
    @status_window.dispose
    @actor_window.dispose if @actor_window != nil
    end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @help_window.update
    @status_window.update
    if @actor_window != nil
      update_actor_selection
    elsif @character_window.active
      update_character_selection
    else
      update_command_selection
    end
  end
  #--------------------------------------------------------------------------
  # ● 부대 윈도우의 갱신
  #--------------------------------------------------------------------------
  def update_character_selection
    @character_window.update
    if Input.trigger?(Input::A)   # 액터 스테이터스를 표시
      Sound.play_decision
      @character_window.active = false
#      @actor_window = Window_Status.new($game_party.members[@character_window.index])
      @actor_window = Window_Status.new($game_party.battle_members[@character_window.index])
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @character_window.active = false
      @character_window.index = -1
    elsif Input.trigger?(Input::C)
      if $game_temp.srpg_member.include?(@character_window.index)
        # 미리 등록되어 있던 멤버라면 제외한다. 강제출격 멤버는 제외할 수 없다
#       if $game_party.members[@character_window.index].auto_battle or
#          (TSRPG::Options::MAP_ACTOR[@map_id] != nil and
#          TSRPG::Options::MAP_ACTOR[@map_id].include?($game_party.members[@character_window.index].id))
       if $game_party.battle_members[@character_window.index].auto_battle or
          (TSRPG::Options::MAP_ACTOR[@map_id] != nil and
          TSRPG::Options::MAP_ACTOR[@map_id].include?($game_party.battle_members[@character_window.index].id))
          Sound.play_buzzer
        else
          Sound.play_cancel
          $game_temp.srpg_member.delete(@character_window.index)
        end
      else
        # 미등록 상태라면 등록, 인원수 한계라면 등록하지 않는다
        if $game_temp.srpg_member.size == @member_max
          Sound.play_buzzer
        else
          Sound.play_decision
          $game_temp.srpg_member.push(@character_window.index)
        end
      end
      # 윈도우의 갱신
      @character_window.refresh
      @status_window.refresh
    end
  end
  #--------------------------------------------------------------------------
  # ● 커맨드 윈도우의 갱신
  #--------------------------------------------------------------------------
  def update_command_selection
    @command_window.update
    if Input.trigger?(Input::B)
      if TSRPG::Options::CANCEL_EDIT
        Sound.play_cancel
        $game_temp.srpg_member = nil
        $scene = Scene_Map.new
      else
        Sound.play_buzzer
      end
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0    # 부대편성
        Sound.play_decision
        @command_window.active = false
        @character_window.active = true
        @character_window.index = 0
      when 1    # 출격
        if $game_temp.srpg_member.size > 0
          Sound.play_decision
          $game_temp.srpg_member.sort!
          $scene = Scene_Map.new
          return
        else
when 2 (여기에 넣는거 아닐까요?)
          Sound.play_buzzer
        end
      end
    end
    end
  #--------------------------------------------------------------------------
  # ● 액터 스테이터스 윈도우의 갱신
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B) or Input.trigger?(Input::C)
      Sound.play_cancel
      @actor_window.dispose
      @actor_window = nil
      @character_window.active = true
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      @character_window.index -= 1
      if @character_window.index < 0
#        @character_window.index = $game_party.members.size - 1
        @character_window.index = $game_party.battle_members.size - 1
      end
      @actor_window.dispose
#      @actor_window = Window_Status.new($game_party.members[@character_window.index])
      @actor_window = Window_Status.new($game_party.battle_members[@character_window.index])
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      @character_window.index += 1
#      if @character_window.index >= $game_party.members.size
      if @character_window.index >= $game_party.battle_members.size
        @character_window.index = 0
      end
      @actor_window.dispose
#      @actor_window = Window_Status.new($game_party.members[@character_window.index])
      @actor_window = Window_Status.new($game_party.battle_members[@character_window.index])
    end
  end
end

Comment '2'
  • profile
    습작 2012.03.26 13:55
          case @command_window.index
          when 0    # 부대편성
            Sound.play_decision
            @command_window.active = false
            @character_window.active = true
            @character_window.index = 0
          when 1    # 출격
            if $game_temp.srpg_member.size > 0
              Sound.play_decision
              $game_temp.srpg_member.sort!
              $scene = Scene_Map.new
              return
            else
              Sound.play_buzzer
            end
          when 2 (여기에.)

          end

    참고로, SRPG 첫번째 버전에서 취소로 나가지 못하게 한 까닭은 출격씬 자체에서 맵 이동 및 출격을 해주는 것이 아니기 때문입니다.
    사실상 출격 커맨드가 해당 출격씬을 닫는 수준이고, 해당 씬이 닫히고 나면 이벤트로 맵이동이 되어 전투가 시작되는 것이지요.
    SRPG2나 SRPG3D 버전을 사용하는 것을 권장합니다.
  • ?
    minibalrog 2012.03.26 18:54

    넵 감사합니다 ^^*


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 21134
RMVX SMAMS 스크립트 오류 3 라테일gm 2015.01.09 300
RMVXA Spriteset_Map 클래스에서 추가적인 비트맵을 생성해 불러온 후, 변수에 따라 다른 이미지 불러오기 3 안나카레리나 2018.09.02 98
RMVXA SPRITE_character 스크립트 삭제했는데 어뜨케 못하나요 2 ☆권지용☆ 2013.01.17 556
RMXP SP를 모두 소모하면 HP를 달게 할 수 있을까요? 6 file 마늘호랑이 2013.06.08 807
한글 패치 기타 SRC나 DNML 유저팬픽시나리오MOD제작툴 한글화 하시는분은 없나요? 1 모드좋아 2020.02.27 262
한글 패치 기타 srpg studio 한글판 있나요? 한글패치라든가, srpg 스튜디오 rpgsmith 2024.10.05 309
기타 SRPG STUDIO의 프리징 현상에 대한 질문 입니다. masterfisher 2018.06.19 315
RMVX SRPG 계열 전투 방식, 주인공 사망과 승리조건 적전멸에 미 실행문제 2 file 볼프강 2011.09.23 2786
RMVX SRPG 관련 질문 글입니다 ㅜ 4 파멸의인도자 2011.11.11 1655
RMVX SRPG 다시 다른 질문 올려요~ 2 뚱가 2011.05.17 886
RMVX SRPG 도와주세요 ㅠㅠ 1 뚱가 2011.05.16 1034
RMVX SRPG 부대편성씬 닫아주세요 2 minibalrog 2012.03.26 2433
RMVX SRPG 스크립트 오류 (충돌인가........?) 5 file 불청객 2011.05.09 1150
RMVX Srpg 스크립트 중에 1 아카로스 2011.05.05 1286
RMVX SRPG 스크립트를 쓰는데 편성화면 뜨기전에 오류납니다. file 잡초더미 2012.05.10 2536
RMVX SRPG 스크립트에서 '맨손' 공격시 오류가 납니다 2 악셀투르 2011.06.15 923
RMVX Srpg 전투시 스킬창에 스킬이 없네요..., 3 karulin 2011.06.24 860
RMXP SRPG 제작 시스템 "GubiD's Tactical Battle System"질문이요! 2 file Blur 2014.01.26 948
RMVX SRPG 질문 3 황제님 2011.11.22 1779
RMVX srpg 캐릭터에 대해서 2 텐가와 2011.01.18 1586
Board Pagination Prev 1 ... 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 ... 518 Next
/ 518