查看: 6945|回复: 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 档案我就贴出来了,若不能贴请告知我删掉:

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

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

  37. module Region_Effects
  38. #------------------------------------------------------------------------------#
  39. #  SCRIPT SETUP OPTIONS
  40. #------------------------------------------------------------------------------#

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

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

  46. #------------------------------------------------------------------------------#
  47. #  ENVIRONMENT REGIONS SETUP
  48. #------------------------------------------------------------------------------#
  49. #------------------------------------------------------------------------------#
  50. #
  51. #  region => ["sound", vol, pitch, event_id, common_event_id]
  52. #
  53. #  region          -  the region ID the effect will activate on
  54. #  sound           -  the name of the SE file. "" for no sound
  55. #  vol             -  the volume of the SE (0 - 100)
  56. #  pitch           -  the pitch of the SE (50 - 150)
  57. #  event_id        -  event ID called from the spawn map. 0 for none.
  58. #  common_event_id -  common event ID to call. 0 for no common event.
  59. #
  60. #------------------------------------------------------------------------------#
  61.     EFFECT = { # ! don't touch this
  62. #------------------------------------------------------------------------------#

  63.     0 => ["", 0, 0, 0, 0],              # No Effect (no region)
  64.    
  65.     # Pre-made effects (requires demo events)
  66.     1 => ["", 0, 0, 5, 0],              # Dirt dust
  67.     2 => ["Blow7", 60, 150, 0, 0],      # Wood surface noise only
  68.     3 => ["Water1", 60, 110, 1, 0],     # Shallow Water
  69.     18 => ["Earth2", 40, 130, 0, 0],     # Hard surface noise only
  70.     5 => ["Damage3", 40, 150, 2, 0],    # Footprints
  71.     6 => ["Ice9", 50, 130, 3, 0],       # Walking over thick grass
  72.     7 => ["", 0, 0, 0, 1],              # Calls common event 1 only
  73.     8 => ["Fire3", 80, 120, 4, 2],      # Calls fire trap
  74.     37 => ["", 80, 120, 6, 0],          # Dust cloud
  75.    
  76.     # You can add more as required. eg:
  77.     # 42 => ["", 0, 0, 0, 0],
  78.     # 18 => ["", 0, 0, 0, 0],
  79.     # etc. etc.
  80.    
  81.     # Only one effect per region number will work
  82.    
  83. #------------------------------------------------------------------------------#
  84.     } # ! don't touch this
  85. #------------------------------------------------------------------------------#
  86. #  END SCRIPT SETUP
  87. #------------------------------------------------------------------------------#
  88.    
  89. end # Region_Effects

  90. module DataManager

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

  99. end

  100. class Game_Player < Game_Character
  101.   
  102.   alias galv_region_effects_update_update_nonmoving update_nonmoving
  103.   def update_nonmoving(last_moving)
  104.     if last_moving
  105.       galv_region_check unless $game_switches[Region_Effects::REGION_EFFECT_SWITCH] == true
  106.     end
  107.     galv_region_effects_update_update_nonmoving(last_moving)
  108.   end

  109.   def galv_region_check
  110.     return if Input.trigger?(:C)
  111.     v = rand(10) - rand(10)
  112.     p = rand(40) - rand(40)
  113.    
  114.     @r_id = $game_map.region_id($game_player.x, $game_player.y)
  115.     return if Region_Effects::EFFECT[@r_id] == nil
  116.    
  117.     sound = Region_Effects::EFFECT[@r_id][0]
  118.     vol = Region_Effects::EFFECT[@r_id][1]
  119.       pit = Region_Effects::EFFECT[@r_id][2]
  120.       eve = Region_Effects::EFFECT[@r_id][3]
  121.       com_eve = Region_Effects::EFFECT[@r_id][4]

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

  130. #==============================================================================
  131. # Credit to Yanfly for modified Spawn event script below
  132. #==============================================================================

  133. class Game_Map
  134.   
  135.   alias galv_region_effects_setup setup
  136.   def setup(map_id)
  137.     @effect_var = []
  138.     galv_region_effects_setup(map_id)
  139.   end
  140.   
  141.   def region_event(dx, dy, event_id, map_id)
  142.     map_id = @map_id if map_id == 0
  143.     map = $data_spawn_map
  144.     event = generated_region_event(map, event_id)
  145.    
  146.     if @effect_var.length < Region_Effects::MAX_EFFECTS
  147.       if @events.keys.max.nil?
  148.         new_id = 1
  149.       else
  150.         new_id = @events.keys.max + 1
  151.       end
  152.         @effect_var.push(new_id)
  153.     else
  154.         new_id = @effect_var.shift
  155.         @effect_var.push(new_id)
  156.     end

  157.     @events[new_id] = Game_Event.new(@map_id, event)
  158.     @events[new_id].moveto(dx, dy)
  159.     SceneManager.scene.spriteset.refresh_characters
  160.   end
  161.   
  162.   def generated_region_event(map, event_id)
  163.     for key in map.events
  164.       event = key[1]
  165.       next if event.nil?
  166.       return event if event.id == event_id
  167.     end
  168.     return nil
  169.   end

  170. end # Game_Map


  171. class Scene_Map < Scene_Base
  172.   attr_accessor :spriteset
  173. end # Scene_Map
复制代码


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.

在本版发帖返回顶部