조회 수 2182 추천 수 0 댓글 9
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
출처 momomo

------------------------------------------------------------

# 카메라 탑재
#
# 전투중에 여러가지 움직입니다.
# 기본적으로 도입하는 것만으로 괜찮습니다.
#
# 2005.5.18 버그 수정
# Arrow_Actor 수정
# self.enemy → self.actor
# 어리석은 미스를 범하고 있었습니다.
#
# 2005.11.5 갱신
# 설정 항목을 늘렸습니다.
# 몇개의 항목은, 디폴트(액터가 배틀 필드상에 없다)상태라면
# 이상하게 되므로, 적절 설정해 주세요.
# (데포 상태로true(으)로 하면 마즈이의 것에는★을 붙이고 있습니다)

module MoMo_Camera
  # 카메라의 이동에 걸치는 프레임수의 초기치
  MOVE_SPEED_INI = 8
  # 카메라의 줌에 걸치는 프레임수의 초기치
  ZOOM_SPEED_INI = 8
  # 배틀 백 사진확대율 추가치(0.0그리고 사진확대 없음)
  BATTLEBACK_ZOOM = 1.0
 
  # 액터도 카메라의 영향을 받도록(듯이) 한다 ★
  # (★(이)가 붙어 있는 항목을 true (으)로 하는 경우 등은 이쪽도 true (으)로 해 주세요)
  CAMERA_UPDATE_ACTOR = false
 
  # 에너미 통상 공격시, 행동자를 주시한다
  ACTIVE_LOOK_ENEMY_NOMAL_ATTACK = true
  # 에너미 방어시, 행동자를 주시한다
  ACTIVE_LOOK_ENEMY_GUARD = true
  # 에너미 도주시, 행동자를 주시한다
  ACTIVE_LOOK_ENEMY_ESCAPE = true
  # 에너미 스킬 사용시, 행동자를 주시한다
  ACTIVE_LOOK_ENEMY_SKILL = true
  # 에너미 선택시, 선택 에너미를 주시한다
  ACTIVE_LOOK_ENEMY_SELECT = true
 
  # 에너미 통상 공격시, 대상자를 주시한다(대상이 액터때) ★
  TARGET_LOOK_ENEMY_NOMAL_ATTACK_TR_ACTOR = false
  # 에너미 통상 공격시, 대상자를 주시한다(대상이 에너미때)
  TARGET_LOOK_ENEMY_NOMAL_ATTACK_TR_ENEMY = true
  # 에너미 스킬 사용시, 대상자를 주시한다(대상이 액터때) ★
  TARGET_LOOK_ENEMY_SKILL_TR_ACTOR = false
  # 에너미 스킬 사용시, 대상자를 주시한다(대상이 에너미때)
  TARGET_LOOK_ENEMY_SKILL_TR_ENEMY = true
 
  # 에너미 위기 발생시는 문답 무용으로 대상을 주시한다(대상이 액터때) ★
  CLITICAL_LOOK_ENEMY_TR_ACTOR = false
  # 에너미 위기 발생시는 문답 무용으로 대상을 주시한다(대상이 에너미때)
  CLITICAL_LOOK_ENEMY_TR_ENEMY = true
  # 에너미 위기 발생시의 줌 배율(줌 하고 싶지 않을 때는0.0(을)를 설정)
  CRITICAL_ZOOM_ENEMY = 0.3
 
  # 액터 통상 공격시, 행동자를 주시한다 ★
  ACTIVE_LOOK_ACTOR_NOMAL_ATTACK = false
  # 액터 방어시, 행동자를 주시한다 ★
  ACTIVE_LOOK_ACTOR_GUARD = false
  # 액터 도주시, 행동자를 주시한다 ★
  ACTIVE_LOOK_ACTOR_ESCAPE = false
  # 액터 스킬 사용시, 행동자를 주시한다 ★
  ACTIVE_LOOK_ACTOR_SKILL = false
  # 액터 아이템 사용시, 행동자를 주시한다 ★
  ACTIVE_LOOK_ACTOR_ITEM = false
  # 액터 선택시, 선택 액터를 주시한다 ★
  ACTIVE_LOOK_ACTOR_SELECT = false
 
  # 액터 통상 공격시, 대상자를 주시한다(대상이 액터때) ★
  TARGET_LOOK_ACTOR_NOMAL_ATTACK_TR_ACTOR = false
  # 액터 통상 공격시, 대상자를 주시한다(대상이 에너미때)
  TARGET_LOOK_ACTOR_NOMAL_ATTACK_TR_ENEMY = true
  # 액터 스킬 사용시, 대상자를 주시한다(대상이 액터때) ★
  TARGET_LOOK_ACTOR_SKILL_TR_ACTOR = false
  # 액터 스킬 사용시, 대상자를 주시한다(대상이 에너미때)
  TARGET_LOOK_ACTOR_SKILL_TR_ENEMY = true
  # 액터 아이템 사용시, 대상자를 주시한다(대상이 액터때) ★
  TARGET_LOOK_ACTOR_ITEM_TR_ACTOR = false
  # 액터 아이템 사용시, 대상자를 주시한다(대상이 에너미때)
  TARGET_LOOK_ACTOR_ITEM_TR_ENEMY = true
 
  # 액터 위기 발생시는 문답 무용으로 대상을 주시한다(대상이 액터때) ★
  CLITICAL_LOOK_ACTOR_TR_ACTOR = true
  # 액터 위기 발생시는 문답 무용으로 대상을 주시한다(대상이 에너미때)
  CLITICAL_LOOK_ACTOR_TR_ENEMY = true
  # 액터 위기 발생시의 줌 배율(줌 하고 싶지 않을 때는0.0(을)를 설정)
  CRITICAL_ZOOM_ACTOR = 0.3
 
  # 에너미 슬립 데미지시에 주시한다
  LOOK_ENEMY_SLIP_DAMAGE = true
 
  # 액터 슬립 데미지시에 주시한다 ★
  LOOK_ACTOR_SLIP_DAMAGE = false
 
  # 커멘드 입력시에, 액터를 주시 ★
  LOOK_ACTOR_COMMAND_INPUT = false
 
  # 행동 종료마다 카메라를 센터링
  EACH_ACTION_CENTERING = true
 
  # 전체 공격시의 줌율
  ALL_ATTACK_ZOOM = 0.6
end

class Battle_Camera
  attr_accessor :x
  attr_accessor :y
  attr_accessor :zoom
  attr_accessor :new_x
  attr_accessor :new_y
  attr_accessor :new_zoom
  def initialize
    @x = 320
    @y = 160
    @zoom = 1.0
    @new_x = @x
    @new_y = @y
    @dis_x = 0
    @dis_y = 0
    @dis_zoom = 0.0
    @new_zoom = @zoom
    @move_speed = MoMo_Camera::MOVE_SPEED_INI
    @zoom_speed = MoMo_Camera::ZOOM_SPEED_INI
  end
  # 새로운 이동처 설정
  def new_x=(newx)
    @new_x = newx
    @dis_x = (@x - @new_x).abs
  end
  def new_y=(newy)
    @new_y = newy
    @dis_y = (@y - @new_y).abs
  end
  def new_zoom=(newz)
    @new_zoom = newz
    @dis_zoom = (@zoom - @new_zoom).abs
  end
  # 카메라 세트
  def set(x, y, zoom=nil, speed=nil)
    unless speed.nil?
      @move_speed = speed
      @zoom_speed = speed
    end
    self.new_x = x
    self.new_y = y
    self.new_zoom = zoom unless zoom.nil?
  end
  # 카메라를 한가운데에
  def center(zoom=1.0)
    self.new_x = 320
    self.new_y = 160
    self.new_zoom = zoom
  end
  # 버틀러 주시
  def battler_look(battler)
    hei = get_battler_height(battler)
    zoom = [160.0 / hei, 0.8].max
    self.new_zoom = zoom
    self.new_x = battler.screen_x
    self.new_y = (battler.screen_y - hei / 2 * [[@new_zoom, 1.0].max, 1.5].min).truncate
  end
  # 버틀러의 계산 여러가지
  def battler_x_plus(battler)
    dis = battler.screen_x - @x
    val = dis * (@zoom - 1.0)
    return val
  end
  def pos_battler_x(battler)
    return battler.screen_x - (@x - 320)
  end
  def battler_x(battler)
    return pos_battler_x(battler) + battler_x_plus(battler)
  end
  def battler_y_plus(battler)
    dis = battler.screen_y - @y
    val = dis * (@zoom - 1.0)
    return val
  end
  def pos_battler_y(battler)
    return battler.screen_y - (@y - 160)
  end
  def battler_y(battler)
    return pos_battler_y(battler) + battler_y_plus(battler)
  end
  # 갱신
  def update
    if @x != @new_x
      if @new_x - @x > 0
        @x = [@x + move_speed_x, @new_x].min
      else
        @x = [@x - move_speed_x, @new_x].max
      end
    end
    if @y != @new_y
      if @new_y - @y > 0
        @y = [@y + move_speed_y, @new_y].min
      else
        @y = [@y - move_speed_y, @new_y].max
      end
    end
    if @zoom != @new_zoom
      if @new_zoom - @zoom > 0
        @zoom = [@zoom + zoom_speed, @new_zoom].min
      else
        @zoom = [@zoom - zoom_speed, @new_zoom].max
      end
    end
  end
  # 이동거리 계산
  def move_speed_x
    return [(@dis_x / @move_speed).to_i, 1].max
  end
  def move_speed_y
    return [(@dis_y / @move_speed).to_i, 1].max
  end
  # 줌 배율 계산
  def zoom_speed
    return [(@dis_zoom / @zoom_speed), 0.01].max
  end
  def get_battler_height(battler)
    bammy = get_battler_bmp(battler)
    return bammy.height
  end
  def get_battler_bmp(battler)
    return RPG::Cache.battler(battler.battler_name, battler.battler_hue)
  end
  def move?
    return (@x != @new_x or @y != @new_y or @zoom != @new_zoom)
  end
end

#==============================================================================
# ■ Spriteset_Battle
#------------------------------------------------------------------------------
#  배틀 화면의 스프라이트를 정리한 클래스입니다.이 클래스는 Scene_Battle 곳간
# 스의 내부에서 사용됩니다.
#==============================================================================

class Spriteset_Battle
  attr_accessor :battle_camera
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  alias spriteset_battle_battle_camera_initialize initialize
  def initialize
    @battle_camera = Battle_Camera.new
    spriteset_battle_battle_camera_initialize
    @battleback_sprite.ox = @viewport1.rect.width / 2
    @battleback_sprite.oy = @viewport1.rect.height / 2
    camera_battleback_scroll
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias spriteset_battle_battle_camera_update update
  def update
    spriteset_battle_battle_camera_update
    camera_update
  end
  # 갱신하는 버틀러의 지정
  def camera_update_battlers
    if MoMo_Camera::CAMERA_UPDATE_ACTOR
      return @enemy_sprites + @actor_sprites
    else
      return @enemy_sprites
    end
  end
  # 카메라 갱신
  def camera_update
    @battle_camera.update
    camera_battleback_scroll
    camera_battleback_zoom
    camera_battler_update
  end
  # 카메라 갱신:배틀 백스크롤
  def camera_battleback_scroll
    # 배틀가방의 계산 여러가지
    view_width = @viewport1.rect.width / 2
    view_height = @viewport1.rect.height / 2
    @battleback_sprite.x = view_width + (view_width - @battle_camera.x) * @battle_camera.zoom
    @battleback_sprite.y = view_height + (view_height - @battle_camera.y) * @battle_camera.zoom
  end
  # 카메라 갱신:배틀 백 줌
  def camera_battleback_zoom
    @battleback_sprite.zoom_x = @battle_camera.zoom + MoMo_Camera::BATTLEBACK_ZOOM
    @battleback_sprite.zoom_y = @battle_camera.zoom + MoMo_Camera::BATTLEBACK_ZOOM
  end
  # 카메라 갱신:버틀러 스프라이트 갱신
  def camera_battler_update
    for sprite in camera_update_battlers
      battler_sprite_zoom(sprite)
      battler_sprite_scroll(sprite)
    end
  end
  # 카메라 갱신:버틀러 스프라이트 갱신:버틀러 스프라이트 스크롤
  def battler_sprite_scroll(sprite)
    if !sprite.nil? and !sprite.battler.nil?
      sprite.x = @battle_camera.battler_x(sprite.battler)
      sprite.y = @battle_camera.battler_y(sprite.battler)
    end
  end
  # 카메라 갱신:버틀러 스프라이트 갱신:버틀러 스프라이트 줌
  def battler_sprite_zoom(sprite)
    unless sprite.nil?
      sprite.zoom_x = @battle_camera.zoom
      sprite.zoom_y = @battle_camera.zoom
    end
  end
end

class Arrow_Actor < Arrow_Base
  attr_accessor :camera
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias arrow_actor_battle_camera_update update
  def update
    arrow_actor_battle_camera_update
    # 스프라이트의 좌표를 재설정
    if self.actor != nil and @camera != nil
      self.x = @camera.battler_x(self.actor)
      self.y = @camera.battler_y(self.actor)
    end
  end
end

class Arrow_Enemy < Arrow_Base
  attr_accessor :camera
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias arrow_enemy_battle_camera_update update
  def update
    arrow_enemy_battle_camera_update
    # 스프라이트의 좌표를 재설정
    if self.enemy != nil and @camera != nil
      self.x = @camera.battler_x(self.enemy)
      self.y = @camera.battler_y(self.enemy)
    end
  end
end

class Scene_Battle
  def camera
    return @spriteset.battle_camera
  end
 
  # 행동측 애니메이션중의 촬영 기술 판정
  def camera_action_judge_active
    if @active_battler.is_a?(Game_Enemy)
      case @active_battler.current_action.kind
      when 0
        camera_action_judge_active_basic_enemy
      when 1
        camera_action_judge_active_skill_enemy
      when 2
        camera_action_judge_active_item_enemy
      end
    else
      case @active_battler.current_action.kind
      when 0
        camera_action_judge_active_basic_actor
      when 1
        camera_action_judge_active_skill_actor
      when 2
        camera_action_judge_active_item_actor
      end
    end
  end
  # 행동측 애니메이션중의 촬영 기술(에너미):기본
  def camera_action_judge_active_basic_enemy
    case @active_battler.current_action.basic
    when 0
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ENEMY_NOMAL_ATTACK
    when 1
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ENEMY_GUARD
    when 2
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ENEMY_ESCAPE
    end
  end
  # 행동측 애니메이션중의 촬영 기술(에너미):스킬
  def camera_action_judge_active_skill_enemy
    camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ENEMY_SKILL
  end
  # 행동측 애니메이션중의 촬영 기술(에너미):아이템(일단 실장)
  def camera_action_judge_active_item_enemy
    camera.battler_look(@active_battler)
  end
  # 행동측 애니메이션중의 촬영 기술(액터):기본
  def camera_action_judge_active_basic_actor
    case @active_battler.current_action.basic
    when 0
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ACTOR_NOMAL_ATTACK
    when 1
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ACTOR_GUARD
    when 2
      camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ACTOR_ESCAPE
    end
  end
  # 행동측 애니메이션중의 촬영 기술(액터):스킬
  def camera_action_judge_active_skill_actor
    camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ACTOR_SKILL
  end
  # 행동측 애니메이션중의 촬영 기술(액터):아이템
  def camera_action_judge_active_item_actor
    camera.battler_look(@active_battler) if MoMo_Camera::ACTIVE_LOOK_ACTOR_ITEM
  end
 
  # 대상측 애니메이션중의 촬영 기술 판정
  def camera_action_judge_target
    if @active_battler.is_a?(Game_Enemy)
      case @active_battler.current_action.kind
      when 0
        camera_action_judge_target_basic_enemy
      when 1
        camera_action_judge_target_skill_enemy
      when 2
        camera_action_judge_target_item_enemy
      end
    else
      case @active_battler.current_action.kind
      when 0
        camera_action_judge_target_basic_actor
      when 1
        camera_action_judge_target_skill_actor
      when 2
        camera_action_judge_target_item_actor
      end
    end
  end
 
  # 대상측 애니메이션중의 촬영 기술(에너미):기본
  def camera_action_judge_target_basic_enemy
    case @active_battler.current_action.basic
    when 0
      camera_action_judge_target_basic_enemy_attack
    when 1
      camera_action_judge_target_basic_enemy_guard
    when 2
      camera_action_judge_target_basic_enemy_escape
    when 3
      camera_action_judge_target_basic_enemy_none
    end
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:공격
  def camera_action_judge_target_basic_enemy_attack
    if @target_battlers.size > 1
      camera.center(MoMo_Camera::ALL_ATTACK_ZOOM)
    else
      if @target_battlers[0].is_a?(Game_Actor)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ENEMY_NOMAL_ATTACK_TR_ACTOR
        if @target_battlers[0].critical
          if MoMo_Camera::CLITICAL_LOOK_ENEMY_TR_ACTOR
            camera.battler_look(@target_battlers[0])
          end
          camera.new_zoom = camera.new_zoom + MoMo_Camera::CRITICAL_ZOOM_ENEMY
        end
      elsif @target_battlers[0].is_a?(Game_Enemy)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ENEMY_NOMAL_ATTACK_TR_ENEMY
        if @target_battlers[0].critical
          if MoMo_Camera::CLITICAL_LOOK_ENEMY_TR_ENEMY
            camera.battler_look(@target_battlers[0])
          end
          camera.new_zoom = camera.new_zoom + MoMo_Camera::CRITICAL_ZOOM_ENEMY
        end
      else
        camera.center
      end
    end
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:방어
  def camera_action_judge_target_basic_enemy_guard
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:도주
  def camera_action_judge_target_basic_enemy_escape
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:아무것도 하지 않는다
  def camera_action_judge_target_basic_enemy_none
  end
 
  # 대상측 애니메이션중의 촬영 기술(에너미):스킬
  def camera_action_judge_target_skill_enemy
    if @target_battlers.size > 1
      camera.center(MoMo_Camera::ALL_ATTACK_ZOOM)
    elsif @target_battlers.size == 1
      if @target_battlers[0].is_a?(Game_Actor)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ENEMY_SKILL_TR_ACTOR
      elsif @target_battlers[0].is_a?(Game_Enemy)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ENEMY_SKILL_TR_ENEMY
      end
    else
      camera.center
    end
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):아이템(일단 실장)
  def camera_action_judge_target_item_enemy
  end
 
  # 대상측 애니메이션중의 촬영 기술(액터):기본
  def camera_action_judge_target_basic_actor
    case @active_battler.current_action.basic
    when 0
      camera_action_judge_target_basic_actor_attack
    when 1
      camera_action_judge_target_basic_actor_guard
    when 2
      camera_action_judge_target_basic_actor_escape
    when 3
      camera_action_judge_target_basic_actor_none
    end
  end
  # 대상측 애니메이션중의 촬영 기술(액터):기본:공격
  def camera_action_judge_target_basic_actor_attack
    if @target_battlers.size > 1
      camera.center(MoMo_Camera::ALL_ATTACK_ZOOM)
    else
      if @target_battlers[0].is_a?(Game_Actor)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_NOMAL_ATTACK_TR_ACTOR
        if @target_battlers[0].critical
          if MoMo_Camera::CLITICAL_LOOK_ACTOR_TR_ACTOR
            camera.battler_look(@target_battlers[0])
          end
          camera.new_zoom = camera.new_zoom + MoMo_Camera::CRITICAL_ZOOM_ACTOR
        end
      elsif @target_battlers[0].is_a?(Game_Enemy)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_NOMAL_ATTACK_TR_ENEMY
        if @target_battlers[0].critical
          if MoMo_Camera::CLITICAL_LOOK_ACTOR_TR_ENEMY
            camera.battler_look(@target_battlers[0])
          end
          camera.new_zoom = camera.new_zoom + MoMo_Camera::CRITICAL_ZOOM_ACTOR
        end
      else
        camera.center
      end
    end
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:방어
  def camera_action_judge_target_basic_actor_guard
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:도주
  def camera_action_judge_target_basic_actor_escape
  end
  # 대상측 애니메이션중의 촬영 기술(에너미):기본:아무것도 하지 않는다
  def camera_action_judge_target_basic_actor_none
  end
  # 대상측 애니메이션중의 촬영 기술(액터):스킬
  def camera_action_judge_target_skill_actor
    if @target_battlers.size > 1
      camera.center(MoMo_Camera::ALL_ATTACK_ZOOM)
    elsif @target_battlers.size == 1
      if @target_battlers[0].is_a?(Game_Actor)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_SKILL_TR_ACTOR
      elsif @target_battlers[0].is_a?(Game_Enemy)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_SKILL_TR_ENEMY
      end
    else
      camera.center
    end
  end
  # 대상측 애니메이션중의 촬영 기술(액터):아이템
  def camera_action_judge_target_item_actor
    if @target_battlers.size > 1
      camera.center(MoMo_Camera::ALL_ATTACK_ZOOM)
    elsif @target_battlers.size == 1
      if @target_battlers[0].is_a?(Game_Actor)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_ITEM_TR_ACTOR
      elsif @target_battlers[0].is_a?(Game_Enemy)
        camera.battler_look(@target_battlers[0]) if MoMo_Camera::TARGET_LOOK_ACTOR_ITEM_TR_ENEMY
      else
      end
    else
      camera.center
    end
  end
  #--------------------------------------------------------------------------
  # ● 파티 커멘드 국면 개시
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_start_phase2 start_phase2
  def start_phase2
    camera.center
    scene_battle_battle_camera_start_phase2
  end
  #--------------------------------------------------------------------------
  # ● 애프터 배틀 국면 개시
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_start_phase5 start_phase5
  def start_phase5
    camera.center
    scene_battle_battle_camera_start_phase5
  end
  #--------------------------------------------------------------------------
  # ● 다음의 액터의 커멘드 입력에
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_phase3_next_actor phase3_next_actor
  def phase3_next_actor
    scene_battle_battle_camera_phase3_next_actor
    if @active_battler != nil and MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.battler_look(@active_battler)
    end
  end
  #--------------------------------------------------------------------------
  # ● 전의 액터의 커멘드 입력에
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_phase3_prior_actor phase3_prior_actor
  def phase3_prior_actor
    scene_battle_battle_camera_phase3_prior_actor
    if @active_battler != nil and MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.battler_look(@active_battler)
    end
  end
  #--------------------------------------------------------------------------
  # ● 액터 선택 개시
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_start_actor_select start_actor_select
  def start_actor_select
    scene_battle_battle_camera_start_actor_select
    if MoMo_Camera::ACTIVE_LOOK_ACTOR_SELECT
      @last_arrow_index = nil
      @actor_arrow.camera = camera
    elsif MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.center
    end
  end
  #--------------------------------------------------------------------------
  # ● 액터 선택 종료
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_end_actor_select end_actor_select
  def end_actor_select
    scene_battle_battle_camera_end_actor_select
    if MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.battler_look(@active_battler)
    else
      camera.center
    end
  end
  #--------------------------------------------------------------------------
  # ● 에너미 선택 개시
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_start_enemy_select start_enemy_select
  def start_enemy_select
    scene_battle_battle_camera_start_enemy_select
    if MoMo_Camera::ACTIVE_LOOK_ENEMY_SELECT
      @last_arrow_index = nil
      @enemy_arrow.camera = camera
    elsif MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.center
    end
  end
  #--------------------------------------------------------------------------
  # ● 에너미 선택 종료
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_end_enemy_select end_enemy_select
  def end_enemy_select
    scene_battle_battle_camera_end_enemy_select
    if MoMo_Camera::LOOK_ACTOR_COMMAND_INPUT
      camera.battler_look(@active_battler)
    else
      camera.center
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (액터 커멘드 국면 : 액터 선택)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase3_actor_select update_phase3_actor_select
  def update_phase3_actor_select
    scene_battle_battle_camera_update_phase3_actor_select
    if MoMo_Camera::ACTIVE_LOOK_ACTOR_SELECT
      if @actor_arrow != nil and (@last_arrow_index != @actor_arrow.index)
        @last_arrow_index = @actor_arrow.index
        camera.battler_look(@actor_arrow.actor)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (액터 커멘드 국면 : 에너미 선택)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase3_enemy_select update_phase3_enemy_select
  def update_phase3_enemy_select
    scene_battle_battle_camera_update_phase3_enemy_select
    if MoMo_Camera::ACTIVE_LOOK_ENEMY_SELECT
      if @enemy_arrow != nil and (@last_arrow_index != @enemy_arrow.index)
        @last_arrow_index = @enemy_arrow.index
        camera.battler_look(@enemy_arrow.enemy)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 국면 스텝 1 : 액션 준비)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase4_step1 update_phase4_step1
  def update_phase4_step1
    unless @camera_move
      if $game_temp.forcing_battler == nil and @action_battlers.size != 0 and
         @action_battlers[0].slip_damage?
        camera_action_judge_phase4_step1
      end
      @camera_move = true
    end
    return if camera.move?
    @camera_move = false
    scene_battle_battle_camera_update_phase4_step1
  end
  def camera_action_judge_phase4_step1
    if @action_battlers[0].is_a?(Game_Enemy)
      camera.battler_look(@action_battlers[0]) if MoMo_Camera::LOOK_ENEMY_SLIP_DAMAGE
    elsif @action_battlers[0].is_a?(Game_Actor)
      camera.battler_look(@action_battlers[0]) if MoMo_Camera::LOOK_ACTOR_SLIP_DAMAGE
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 국면 스텝 3 : 행동측 애니메이션)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase4_step3 update_phase4_step3
  def update_phase4_step3
    unless @camera_move
      camera_action_judge_active
      @camera_move = true
    end
    return if camera.move?
    @camera_move = false
    scene_battle_battle_camera_update_phase4_step3
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 국면 스텝 4 : 대상측 애니메이션)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase4_step4 update_phase4_step4
  def update_phase4_step4
    unless @camera_move
      camera_action_judge_target
      @camera_move = true
    end
    return if camera.move?
    @camera_move = false
    scene_battle_battle_camera_update_phase4_step4
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 국면 스텝 6 : 리프레쉬)
  #--------------------------------------------------------------------------
  alias scene_battle_battle_camera_update_phase4_step6 update_phase4_step6
  def update_phase4_step6
    scene_battle_battle_camera_update_phase4_step6
    camera.center if MoMo_Camera::EACH_ACTION_CENTERING
  end
end

============

턴알에서 어떤 몬스터를 공격하라고 지정했을시 그 몬스터가 줌되는 스크립트입니다

예제를 첨부해놨으니 참고하시기바랍니다 ㅇㅂㅇ

  • profile
    니오티 2010.01.13 22:57

    상당한데..? 집에서 테스트해볼게!

  • ?
    ruby 2010.01.14 13:06

    우와우우와 진동스크립트랑 링메뉴스크립트등등잡다한걸 짬뽕하면 프론트뷰라도 실감이 나겠네요 !!!

  • ?
    미니장 2010.02.16 12:19

    와우!!!!

  • ?
    XP 팬 2010.05.02 13:53

    안좋은거 같은데(쓰기전)

  • ?
    XP 팬 2010.05.02 14:31

    와우 진짜 좋다!!!!(쓴후)

  • ?
    자위나믹듀오 2011.01.14 22:43

    안되는데 뭐가좋다는거지 ㅡㅡ

  • ?
    RPG군 2011.01.28 15:59

    감솨합니돠

  • ?
    크그르그아 2011.07.22 22:29

    턴알이 머에요?

  • ?
    Scarf 2012.01.18 14:17

    화면이 움직이기는 하는데 줌이 아니라 언줌이 되는데요;


  1. 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다

    Date2010.01.09 Category공지사항 Byruby Views22086 Votes0
    read more
  2. 스크립트 게시판 관리자' ruby ' 입니다

    Date2010.01.09 Category공지사항 Byruby Views20726 Votes0
    read more
  3. 일본 스크립트/소스 공유 포럼

    Date2010.01.05 Category공지사항 By니오티 Views22257 Votes0
    read more
  4. 누구나 쉽게 만드는 액션알피지

    Date2012.11.25 Category전투관련 By펜릴 Views4357 Votes0
    Read More
  5. 초간단 XAS 오리지널.

    Date2011.08.04 Category전투관련 By호호리터엉 Views2620 Votes0
    Read More
  6. ZTBS

    Date2010.06.05 Category전투관련 By강현문 Views3549 Votes0
    Read More
  7. 턴제 전투방식 스크립트!!!!!!!

    Date2010.04.30 Category전투관련 ByXP 팬 Views3330 Votes0
    Read More
  8. 간단한 액션알피지용 스크립트 Ver.1.01 (게임오버 추가)

    Date2010.04.11 Category전투관련 By펜릴 Views8748 Votes0
    Read More
  9. ABP 액알 예제

    Date2010.02.10 Category전투관련 Byruby Views3531 Votes1
    Read More
  10. 어떤 한 몬스터를 공격지정할때 그 몬스터가 줌되는 스크립트

    Date2010.01.13 Category전투관련 Bywindshy Views2182 Votes0
    Read More
  11. 리얼타임을 이용한 딜레이 구현

    Date2010.01.10 Category전투관련 By펜릴 Views4197 Votes0
    Read More
  12. 레벨업시 체력 회복 스크립트

    Date2010.01.05 Category전투관련 By루시아스 Views2113 Votes0
    Read More
  13. 파괴효과 스크립트 이벤트적용 <사용법>

    Date2007.12.06 Category전투관련 By아하하 Views2691 Votes3
    Read More
  14. 파괴효과 추천스크립트

    Date2007.12.06 Category전투관련 By아하하 Views3588 Votes1
    Read More
  15. 콤보 스크립트

    Date2007.12.05 Category전투관련 By아하하 Views3700 Votes4
    Read More
  16. 턴알 게이지바 변경 스크립트 (HP/SP)

    Date2007.02.20 Category전투관련 By니오티 Views3984 Votes2
    Read More
  17. 게이지 확인창 스크립트 (HP/SP/EXP)

    Date2007.02.20 Category전투관련 By니오티 Views3540 Votes5
    Read More
Board Pagination Prev 1 Next
/ 1

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45