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
#--------------끝

사용법

스크립트 26~34줄까지 설명이 있습니다.


출처는 수수께끼의정사면체

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '20'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
841 기타 상점 변동시세 적용 스크립트 3 file 백호 2009.02.21 1159
840 기타 전투 승리 BGM+페이드아웃 스크립트 1 file 백호 2009.02.21 1159
839 상태/속성 순간 적으로 무적상태되는 스크립트 백호 2009.02.21 1161
838 기타 Resolution Changer Ultimate by Zeus81 7 file 습작 2013.05.05 1162
837 전투 데미지마루 백호 2009.02.21 1163
836 기타 마우스로 길찾기 스크립트 예제 file 백호 2009.02.21 1168
835 이름입력 Advanced Enter Hero Name Window by RPG Advocate 백호 2009.02.22 1168
834 기타 메세지를 분출해 표시 백호 2009.02.22 1169
833 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1170
832 장비 장비무기가이드&쉴드방어 1 백호 2009.02.22 1178
831 기타 현재 맵BGM을 그대로 전투 BGM으로 연결 from phylomortis.com 백호 2009.02.22 1180
830 기타 Steal Script (SDK Required) file 백호 2009.02.21 1182
829 전투 RTAB 1.15와 애드온 from 歯車の城 4 file 백호 2009.02.22 1186
828 영상 XP에서 AVI파일을 지원가능하게 하는 스크립트 2 백호 2009.02.21 1188
827 전투 Advanced Individual Battle Command v2.1 by Trickster@rmxp.org (SDK호환) 1 file 백호 2009.02.22 1189
826 전투 SimpleAction (출처 -RPGXP 포럼 비밀소년님의 자작품) 1 file 백호 2009.02.21 1193
825 스킬 KGC - 도주스킬 스크립트 백호 2009.02.22 1193
824 이동 및 탈것 RMVX dash for RMXP by PK8 2 Alkaid 2013.01.22 1193
823 저장 StupidStormy36's Custom Save System 3 Alkaid 2010.10.05 1199
822 변수/스위치 Switchless Common Events by PK8(XP/VX/VXA) Alkaid 2012.09.15 1199
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52