XP 스크립트


# 플레이어 발소리 SE ver. 1.01 (Since 2006/01/31)
# by Tetra-Z
#
# 맵상에서 플레이어에 발소리를 설정합니다.
#
# $game_system.player_step_se_permission : 발소리 허가.
#
# ver. 1.01(2006/02/18)
# 커스터마이즈 포인트에서 발밑 태그 ID·맵 ID를 참조 가능하게.

#==============================================================================
# TETRAZ61
#==============================================================================
module TETRAZ61
  def self.actor_step_se(id, tag, map)
    case id
    #==========================================================================
    # □ 커스터마이즈 포인트
    #==========================================================================
    # tag에서 발밑 태그 ID, map에서 맵 ID의 조건부도 할 수 있습니다.
    when 1
      return [[1, 3], "032-Switch01", 80, 100]
    when 2
      return [[1, 3], "040-Knock01", 80, 100]
    # when 엑터 ID
    #  return [[패턴], "SE명", 음량, 피치]
    #
    # 엑터 ID : 선두의 엑터의 ID.
    # 패턴  : 발소리가 있는 패턴. 캐릭터 화상의 왼쪽으로부터 0, 1, 2, 3.
    # SE명      : 발소리가 되는 SE파일명.
    # 음량      : SE의 음량. 생략 하면(자) 80.
    # 피치    : SE의 피치. 생략 하면(자) 100.
    #==========================================================================
    end
    return []
  end
end
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
  #--------------------------------------------------------------------------
  # ● 공개 인스턴스 변수
  #--------------------------------------------------------------------------
  attr_accessor :player_step_se_permission
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  alias tetraz61_initialize initialize
  def initialize
    tetraz61_initialize
    @player_step_se_permission = true
  end
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias tetraz61_update update
  def update
    last_pattern = @pattern
    tetraz61_update
    actor_id = tetraz61_party0
    return if (! $game_system.player_step_se_permission or $data_actors[actor_id]. nil? )
    se = TETRAZ61.actor_step_se(actor_id, self.terrain_tag, $game_map.map_id)
    return if (!(se.is_a? (Array)) or se.size < 2 or !(se[0]. is_a? (Array)) or se[1] == "")
    if (last_pattern != @pattern and se[0]. include? (@pattern))
      se[2] = 80 if (se.size < 3 or se[2]. nil? )
      se[3] = 100 if (se.size < 4 or se[3]. nil? )
      Audio.se_play("Audio/SE/" + se[1], se[2], se[3]) rescue nil
    end
  end
  #--------------------------------------------------------------------------
  # ● 선두의 엑터
  #--------------------------------------------------------------------------
  def tetraz61_party0
    if defined?  xrxs41_refresh
      id = $game_variables[XRXS41::MAPCHAR_VARIABLE_ID]
      return id unless $data_actors[id]. nil?
    end
    return $game_party.actors.size > 0 ?  $game_party.actors[0]. id : 0
  end
end

Who's 아방스

profile
Atachment
첨부 '1'
Comment '9'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
721 이동 및 탈것 그래픽 변경 데쉬 3 file 백호 2009.02.22 2499
720 Fog of War 4 file 실마릴 2008.06.19 2498
719 전투 전투 결과 화면 개조 스크립트 10 file 백호 2009.02.21 2494
718 기타 ABS 몬스터 HP 게이지 바 11 백호 2009.02.22 2483
717 기타 맵 이동시 로딩 그림 표시 14 file 백호 2009.02.21 2479
716 장비 장비창업그레이드 ps인간 2009.01.23 2478
715 HUD MOG_Active_Hud 3 file Bera 2010.09.11 2468
714 기타 [신기술 체험] 마우스 사용 심플액션 7 file 백호 2009.02.22 2467
713 전투 배틀 스테이터스·클리어 디자인 13 file 백호 2009.02.21 2467
712 HUD 머리위에 직업명을 표시해줍니다... 9 file 제로스S2 2009.08.03 2465
711 기타 대화 글씨가 한글자씩 나오는 스크립트 2 백호 2009.02.22 2464
710 전투 GubiD's Tactical Battle System 1.5.1.4 (RMXP용) GTBS 2 Alkaid 2010.09.03 2456
709 전투 전투 카메라 스크립트 5 file 백호 2009.02.21 2454
708 스킬 스킬북 스크립트 8 WMN 2008.03.17 2452
707 메뉴 1인용 메뉴 스크립트 6 WMN 2008.03.17 2450
706 기타 업데이트 (죽었을경우부활 )스크립트한글화 2 by향온 2011.09.27 2438
» [알피지2님 제공] 발소리 스크립트 9 file 아방스 2007.11.09 2438
704 상태/속성 Cool Edited Status Screen. 10 아방스 2009.01.12 2430
703 기타 [신기술 체험] 페스트 채팅 17 file 백호 2009.02.22 2412
702 이동 및 탈것 8방향 스크립트 12 file 백호 2009.02.21 2412
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 52 Next
/ 52