查看: 6885|回复: 1

[已经解决] 脚印和脚步声

[复制链接]
梦石
0
星屑
349
在线时间
64 小时
注册时间
2013-1-22
回帖
7
发表于 2013-2-9 18:00:18 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
走一步会有脚步声,后面有脚印,大约2、3秒消失,求脚本T T
这是脚印和SE
!Other1.png

se_maoudamashii_se_footstep01.ogg

11.69 KB, 下载次数: 258

梦石
0
星屑
50
在线时间
687 小时
注册时间
2012-10-29
回帖
1526
发表于 2013-2-9 18:52:08 | 显示全部楼层
本帖最后由 j433463 于 2013-2-9 21:01 编辑

脚印的脚本,也许这个日站脚本可以适用:

http://zenith.ifdef.jp/rgss/rgss16.html

至于脚步声,应该是在足迹作成那边用 audio_se_play() 来播放音效即可。
(脚本没注明 rgss 版本,我怀疑它是 rgss1,xp 的脚本)



看来也有屏蔽外连的问题了,如果代理能连得上,下面这个也许更好吧,
这个本身就有脚步声效的设定了,还会依照地形区域有不同的足迹效果,
是 rgss3 的:

http://www.rpgmakervxace.net/topic/7046-region-effects/

我刚进去作者的 BLOG,它的使用声明用百度翻译的结果若没有翻错,应该是可以免费随便用的,
其中也没看到有关于配布的限制,所以脚本和 DEMO 档案我就贴出来了,若不能贴请告知我删掉:

[pre lang="ruby" line="1"]#------------------------------------------------------------------------------#
#  Galv's Region Effects
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.7
#  Credit to Yanfly and Quack for event spawning method
#------------------------------------------------------------------------------#
#  2012-11-15 - Version 1.7 - Made effects work during forced move routes
#  2012-11-15 - Version 1.6 - Fixed a major bug caused with last update.
#  2012-11-04 - Version 1.5 - streamline updates and bug fix suggested by Quack
#  2012-10-23 - Version 1.4 - updated alias naming convention for compatability
#  2012-10-09 - Version 1.3 - re-wrote the code to be more efficient when
#                           - using many different region effects.
#  2012-10-09 - Version 1.2 - code tweak that may reduce lag on low-end pc's
#  2012-09-16 - Version 1.1 - now compatible with Yanfly's spawn events
#  2012-09-15 - Version 1.0 - release
#------------------------------------------------------------------------------#
#  Designed to activate effects when regions are stood on.
#  An effect can include:
#     - Sound Effect
#     - An event that appears at the player's location
#     - Activating a common event
#
#
#  INSTRUCTIONS:
#  1. Copy image from /Graphics/Characters/!Other-specials.png to your project
#  2. Copy the map from this demo into your game.
#        - this map has events set up for the pre-made effects
#  3. Check the map ID of the map you copied in your game
#  4. Change the SPAWN_MAP_ID number to this map ID
#  5. Change REGION_EFFECT_SWITCH to a switch you are not using in your game.
#  6. Add some regions to your map to test.
#
#------------------------------------------------------------------------------#

$imported = {} if $imported.nil?
$imported["Region_Effects"] = true

module Region_Effects
#------------------------------------------------------------------------------#
#  SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#

   REGION_EFFECT_SWITCH = 1   # Turn this switch ON to disable the effects.

   MAX_EFFECTS = 30           # Number of effects that can be on screen
                              # before being removed. (To prevent lag)
                              
   SPAWN_MAP_ID = 2           # Map ID of the map you store event effects in.

#------------------------------------------------------------------------------#
#  ENVIRONMENT REGIONS SETUP
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
#
#  region => ["sound", vol, pitch, event_id, common_event_id]
#
#  region          -  the region ID the effect will activate on
#  sound           -  the name of the SE file. "" for no sound
#  vol             -  the volume of the SE (0 - 100)
#  pitch           -  the pitch of the SE (50 - 150)
#  event_id        -  event ID called from the spawn map. 0 for none.
#  common_event_id -  common event ID to call. 0 for no common event.
#
#------------------------------------------------------------------------------#
    EFFECT = { # ! don't touch this
#------------------------------------------------------------------------------#

    0 => ["", 0, 0, 0, 0],              # No Effect (no region)
   
    # Pre-made effects (requires demo events)
    1 => ["", 0, 0, 5, 0],              # Dirt dust
    2 => ["Blow7", 60, 150, 0, 0],      # Wood surface noise only
    3 => ["Water1", 60, 110, 1, 0],     # Shallow Water
    18 => ["Earth2", 40, 130, 0, 0],     # Hard surface noise only
    5 => ["Damage3", 40, 150, 2, 0],    # Footprints
    6 => ["Ice9", 50, 130, 3, 0],       # Walking over thick grass
    7 => ["", 0, 0, 0, 1],              # Calls common event 1 only
    8 => ["Fire3", 80, 120, 4, 2],      # Calls fire trap
    37 => ["", 80, 120, 6, 0],          # Dust cloud
   
    # You can add more as required. eg:
    # 42 => ["", 0, 0, 0, 0],
    # 18 => ["", 0, 0, 0, 0],
    # etc. etc.
   
    # Only one effect per region number will work
   
#------------------------------------------------------------------------------#
    } # ! don't touch this
#------------------------------------------------------------------------------#
#  END SCRIPT SETUP
#------------------------------------------------------------------------------#
   
end # Region_Effects

module DataManager

#--------------------------------------------------------------------------
# alias method: load_normal_database
#--------------------------------------------------------------------------
class <<self; alias load_normal_database_spawn_alias load_normal_database; end
def self.load_normal_database
  load_normal_database_spawn_alias
  $data_spawn_map = load_data(sprintf("Data/Map%03d.rvdata2", Region_Effects::SPAWN_MAP_ID))
end

end

class Game_Player < Game_Character
  
  alias galv_region_effects_update_update_nonmoving update_nonmoving
  def update_nonmoving(last_moving)
    if last_moving
      galv_region_check unless $game_switches[Region_Effects::REGION_EFFECT_SWITCH] == true
    end
    galv_region_effects_update_update_nonmoving(last_moving)
  end

  def galv_region_check
    return if Input.trigger?(:C)
    v = rand(10) - rand(10)
    p = rand(40) - rand(40)
   
    @r_id = $game_map.region_id($game_player.x, $game_player.y)
    return if Region_Effects::EFFECT[@r_id] == nil
   
    sound = Region_Effects::EFFECT[@r_id][0]
    vol = Region_Effects::EFFECT[@r_id][1]
      pit = Region_Effects::EFFECT[@r_id][2]
      eve = Region_Effects::EFFECT[@r_id][3]
      com_eve = Region_Effects::EFFECT[@r_id][4]

      RPG::SE.new(sound, vol + v, pit + p).play
      if eve > 0
        $game_map.region_event($game_player.x, $game_player.y, eve, Region_Effects::SPAWN_MAP_ID)
      end
        $game_temp.reserve_common_event(com_eve) unless com_eve == nil
  end
  
end # Game_Player

#==============================================================================
# Credit to Yanfly for modified Spawn event script below
#==============================================================================

class Game_Map
  
  alias galv_region_effects_setup setup
  def setup(map_id)
    @effect_var = []
    galv_region_effects_setup(map_id)
  end
  
  def region_event(dx, dy, event_id, map_id)
    map_id = @map_id if map_id == 0
    map = $data_spawn_map
    event = generated_region_event(map, event_id)
   
    if @effect_var.length < Region_Effects::MAX_EFFECTS
      if @events.keys.max.nil?
        new_id = 1
      else
        new_id = @events.keys.max + 1
      end
        @effect_var.push(new_id)
    else
        new_id = @effect_var.shift
        @effect_var.push(new_id)
    end

    @events[new_id] = Game_Event.new(@map_id, event)
    @events[new_id].moveto(dx, dy)
    SceneManager.scene.spriteset.refresh_characters
  end
  
  def generated_region_event(map, event_id)
    for key in map.events
      event = key[1]
      next if event.nil?
      return event if event.id == event_id
    end
    return nil
  end

end # Game_Map


class Scene_Map < Scene_Base
  attr_accessor :spriteset
end # Scene_Map[/pre]

Demo 档按此下载:

Region Effects v.1.6.part2.rar (552.69 KB, 下载次数: 263)

Region Effects v.1.6.part1.rar (878.91 KB, 下载次数: 307)

Demo 的版本是 1.6,脚本是 1.7,不过 Demo 的效果已经十分的好了。

点评

我看到粉五了!  发表于 2013-2-16 20:47
上不去...这网站是挂代理才能上还是我电脑有问题  发表于 2013-2-9 19:34

评分

参与人数 1梦石 +1 收起 理由
Mic_洛洛 + 1 认可答案

查看全部评分

修改劇本中,仔細審查原來的劇情大綱,覺得有點不太滿意,嘗試編寫不同主角不同主線的劇情,希望能寫得出來。
回复 1 0

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部