设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 6156|回复: 1
打印 上一主题 下一主题

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
349
在线时间
64 小时
注册时间
2013-1-22
帖子
13
跳转到指定楼层
1
 楼主| 发表于 2013-2-9 18:00:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

!Other1.png (2.16 KB, 下载次数: 53)

!Other1.png

se_maoudamashii_se_footstep01.ogg

11.69 KB, 下载次数: 257

Lv1.梦旅人

梦石
0
星屑
50
在线时间
687 小时
注册时间
2012-10-29
帖子
1543
2
发表于 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 档案我就贴出来了,若不能贴请告知我删掉:

RUBY 代码复制
  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.  
  36. $imported = {} if $imported.nil?
  37. $imported["Region_Effects"] = true
  38.  
  39. module Region_Effects
  40. #------------------------------------------------------------------------------#
  41. #  SCRIPT SETUP OPTIONS
  42. #------------------------------------------------------------------------------#
  43.  
  44.    REGION_EFFECT_SWITCH = 1   # Turn this switch ON to disable the effects.
  45.  
  46.    MAX_EFFECTS = 30           # Number of effects that can be on screen
  47.                               # before being removed. (To prevent lag)
  48.  
  49.    SPAWN_MAP_ID = 2           # Map ID of the map you store event effects in.
  50.  
  51. #------------------------------------------------------------------------------#
  52. #  ENVIRONMENT REGIONS SETUP
  53. #------------------------------------------------------------------------------#
  54. #------------------------------------------------------------------------------#
  55. #
  56. #  region => ["sound", vol, pitch, event_id, common_event_id]
  57. #
  58. #  region          -  the region ID the effect will activate on
  59. #  sound           -  the name of the SE file. "" for no sound
  60. #  vol             -  the volume of the SE (0 - 100)
  61. #  pitch           -  the pitch of the SE (50 - 150)
  62. #  event_id        -  event ID called from the spawn map. 0 for none.
  63. #  common_event_id -  common event ID to call. 0 for no common event.
  64. #
  65. #------------------------------------------------------------------------------#
  66.     EFFECT = { # ! don't touch this
  67. #------------------------------------------------------------------------------#
  68.  
  69.     0 => ["", 0, 0, 0, 0],              # No Effect (no region)
  70.  
  71.     # Pre-made effects (requires demo events)
  72.     1 => ["", 0, 0, 5, 0],              # Dirt dust
  73.     2 => ["Blow7", 60, 150, 0, 0],      # Wood surface noise only
  74.     3 => ["Water1", 60, 110, 1, 0],     # Shallow Water
  75.     18 => ["Earth2", 40, 130, 0, 0],     # Hard surface noise only
  76.     5 => ["Damage3", 40, 150, 2, 0],    # Footprints
  77.     6 => ["Ice9", 50, 130, 3, 0],       # Walking over thick grass
  78.     7 => ["", 0, 0, 0, 1],              # Calls common event 1 only
  79.     8 => ["Fire3", 80, 120, 4, 2],      # Calls fire trap
  80.     37 => ["", 80, 120, 6, 0],          # Dust cloud
  81.  
  82.     # You can add more as required. eg:
  83.     # 42 => ["", 0, 0, 0, 0],
  84.     # 18 => ["", 0, 0, 0, 0],
  85.     # etc. etc.
  86.  
  87.     # Only one effect per region number will work
  88.  
  89. #------------------------------------------------------------------------------#
  90.     } # ! don't touch this
  91. #------------------------------------------------------------------------------#
  92. #  END SCRIPT SETUP
  93. #------------------------------------------------------------------------------#
  94.  
  95. end # Region_Effects
  96.  
  97. module DataManager
  98.  
  99. #--------------------------------------------------------------------------
  100. # alias method: load_normal_database
  101. #--------------------------------------------------------------------------
  102. class <<self; alias load_normal_database_spawn_alias load_normal_database; end
  103. def self.load_normal_database
  104.   load_normal_database_spawn_alias
  105.   $data_spawn_map = load_data(sprintf("Data/Map%03d.rvdata2", Region_Effects::SPAWN_MAP_ID))
  106. end
  107.  
  108. end
  109.  
  110. class Game_Player < Game_Character
  111.  
  112.   alias galv_region_effects_update_update_nonmoving update_nonmoving
  113.   def update_nonmoving(last_moving)
  114.     if last_moving
  115.       galv_region_check unless $game_switches[Region_Effects::REGION_EFFECT_SWITCH] == true
  116.     end
  117.     galv_region_effects_update_update_nonmoving(last_moving)
  118.   end
  119.  
  120.   def galv_region_check
  121.     return if Input.trigger?(:C)
  122.     v = rand(10) - rand(10)
  123.     p = rand(40) - rand(40)
  124.  
  125.     @r_id = $game_map.region_id($game_player.x, $game_player.y)
  126.     return if Region_Effects::EFFECT[@r_id] == nil
  127.  
  128.     sound = Region_Effects::EFFECT[@r_id][0]
  129.     vol = Region_Effects::EFFECT[@r_id][1]
  130.       pit = Region_Effects::EFFECT[@r_id][2]
  131.       eve = Region_Effects::EFFECT[@r_id][3]
  132.       com_eve = Region_Effects::EFFECT[@r_id][4]
  133.  
  134.       RPG::SE.new(sound, vol + v, pit + p).play
  135.       if eve > 0
  136.         $game_map.region_event($game_player.x, $game_player.y, eve, Region_Effects::SPAWN_MAP_ID)
  137.       end
  138.         $game_temp.reserve_common_event(com_eve) unless com_eve == nil
  139.   end
  140.  
  141. end # Game_Player
  142.  
  143. #==============================================================================
  144. # Credit to Yanfly for modified Spawn event script below
  145. #==============================================================================
  146.  
  147. class Game_Map
  148.  
  149.   alias galv_region_effects_setup setup
  150.   def setup(map_id)
  151.     @effect_var = []
  152.     galv_region_effects_setup(map_id)
  153.   end
  154.  
  155.   def region_event(dx, dy, event_id, map_id)
  156.     map_id = @map_id if map_id == 0
  157.     map = $data_spawn_map
  158.     event = generated_region_event(map, event_id)
  159.  
  160.     if @effect_var.length < Region_Effects::MAX_EFFECTS
  161.       if @events.keys.max.nil?
  162.         new_id = 1
  163.       else
  164.         new_id = @events.keys.max + 1
  165.       end
  166.         @effect_var.push(new_id)
  167.     else
  168.         new_id = @effect_var.shift
  169.         @effect_var.push(new_id)
  170.     end
  171.  
  172.     @events[new_id] = Game_Event.new(@map_id, event)
  173.     @events[new_id].moveto(dx, dy)
  174.     SceneManager.scene.spriteset.refresh_characters
  175.   end
  176.  
  177.   def generated_region_event(map, event_id)
  178.     for key in map.events
  179.       event = key[1]
  180.       next if event.nil?
  181.       return event if event.id == event_id
  182.     end
  183.     return nil
  184.   end
  185.  
  186. end # Game_Map
  187.  
  188.  
  189. class Scene_Map < Scene_Base
  190.   attr_accessor :spriteset
  191. 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

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-16 14:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表