查看: 3386|回复: 3

[已经解决] 寻求RMVA脚本高手帮忙

[复制链接]
梦石
0
星屑
9973
在线时间
1649 小时
注册时间
2012-6-6
回帖
306
发表于 2014-1-25 00:14:30 | 显示全部楼层 |阅读模式
悬赏25星屑已解决
本帖最后由 流浪杰哥 于 2014-1-25 00:18 编辑

先上图再说 QQ图片20140124235828.jpg




我使用的是后知后觉的横版战斗脚本。。。。。。。。在下所求的只有两个:


1.在我方角色脚下显示血条(能用图片血条最好)
2.撞墙的声音(角色遇到不能通行的地图发出声音)





有意者可加本人QQ:786276587私聊

最佳答案

查看完整内容

第一个问题,这里 贴在后知后觉脚本的后面 第二个问题感觉说的不是很清楚,反正我先写了一个,不对再找我,在下面 [pre lang="ruby" line="1"]#==============================================================================# # ※ 后知后觉横版战斗模板 增强补丁 #------------------------------------------------------------------------------# # 添加了战斗时角色脚下的血槽 # 此脚本为定制脚本 # ...

百合控

梦石
0
星屑
6548
在线时间
1275 小时
注册时间
2013-8-21
回帖
3522

开拓者

发表于 2014-1-25 00:14:31 | 显示全部楼层
本帖最后由 余烬之中 于 2014-1-27 23:15 编辑

第一个问题,这里 贴在后知后觉脚本的后面
第二个问题感觉说的不是很清楚,反正我先写了一个,不对再找我,在下面
  1. #==============================================================================#
  2. # ※ 后知后觉横版战斗模板 增强补丁
  3. #------------------------------------------------------------------------------#
  4. #  添加了战斗时角色脚下的血槽
  5. #  此脚本为定制脚本
  6. #                                                                      影月千秋
  7. #                                                                   2014.01.27 #
  8. #==============================================================================#


  9. #==============================================================================
  10. # ■ Hzhj::HorizontalBattleSystem
  11. #------------------------------------------------------------------------------
  12. #  只在这里进行编辑
  13. #==============================================================================
  14. module Hzhj::HorizontalBattleSystem
  15.   
  16.   MoGB_LOC_X = "index * 30 + 300"
  17.   MoGB_LOC_Y = "index * 45 + 20"
  18.   # 值槽位置计算公式
  19.   
  20.   # ·关于图片
  21.   # 放在Graphics\System下
  22.   # ·图片名
  23.   # Mo_Hzhj_HBS_GB_B.png  背景
  24.   # Mo_Hzhj_HBS_GB_F.png  槽图
  25.   
  26.   # 值槽左上角与图片左上角位置差
  27.   # 分别为横纵坐标之差
  28.   MoGB_ADD_X = 1
  29.   MoGB_ADD_Y = 4
  30. end
  31. #==============================================================================
  32. # ■ SpriteSet_MoGagueBar_ForHzhjHBS
  33. #==============================================================================
  34. class SpriteSet_Mo_GB_HzhjHBS
  35.   include Hzhj::HorizontalBattleSystem
  36.   #--------------------------------------------------------------------------
  37.   # ● 初始化
  38.   #--------------------------------------------------------------------------
  39.   def initialize(viewport, battler)
  40.     [url=home.php?mod=space&uid=133701]@battler[/url] = battler
  41.     return if @battler.nil? || !@battler.actor?
  42.     @back = Sprite_Base.new(viewport)
  43.     @back.bitmap = Cache.system("Mo_Hzhj_HBS_GB_B") rescue nil
  44.     @back.x = eval("battler.#{MoGB_LOC_X}")
  45.     @back.y = eval("battler.#{MoGB_LOC_Y}")
  46.     @back.z = battler.screen_z + 5 - battler.index
  47.     @fore = Sprite_Base.new(viewport)
  48.     @fore.bitmap = Cache.system("Mo_Hzhj_HBS_GB_F") rescue nil
  49.     @fore.x = @back.x + MoGB_ADD_X
  50.     @fore.y = @back.y + MoGB_ADD_Y
  51.     @fore.z = @back.z + 1
  52.     @rate = @battler.hp_rate
  53.     refresh
  54.   end
  55.   #--------------------------------------------------------------------------
  56.   # ● 刷新
  57.   #--------------------------------------------------------------------------
  58.   def update
  59.     refresh if @rate != @battler.hp_rate
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ● 描绘
  63.   #--------------------------------------------------------------------------
  64.   def refresh
  65.     @rate = @battler.hp_rate
  66.     @fore.zoom_x = @rate
  67.   end
  68.   #--------------------------------------------------------------------------
  69.   # ● 释放
  70.   #--------------------------------------------------------------------------
  71.   def dispose
  72.     @fore.bitmap.dispose if @back.bitmap
  73.     @fore.dispose
  74.     @back.bitmap.dispose if @back.bitmap
  75.     @back.dispose
  76.   end
  77. end
  78. #==============================================================================
  79. # ■ Spriteset_Battle
  80. #==============================================================================
  81. class Spriteset_Battle
  82.   #--------------------------------------------------------------------------
  83.   # ● 生成角色活动块
  84.   #--------------------------------------------------------------------------
  85.   alias :mo_gb_hzhjHBS_create_actors :create_actors
  86.   def create_actors
  87.     mo_gb_hzhjHBS_create_actors   
  88.     create_mo_hzhjHBS_gb
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ● 释放角色活动块
  92.   #--------------------------------------------------------------------------
  93.   def create_mo_hzhjHBS_gb
  94.     @mo_actor_gague_bar = Array.new(4){|i|
  95.       SpriteSet_Mo_GB_HzhjHBS.new(@viewport1, $game_party.battle_members[i])
  96.     }
  97.   end
  98.   #--------------------------------------------------------------------------
  99.   # ● 释放角色活动块
  100.   #--------------------------------------------------------------------------
  101.   alias :mo_gb_hzhjHBS_dispose_actors :dispose_actors
  102.   def dispose_actors
  103.     mo_gb_hzhjHBS_dispose_actors   
  104.     dispose_mo_hzhjHBS_gb
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ● 释放值槽活动块
  108.   #--------------------------------------------------------------------------
  109.   def dispose_mo_hzhjHBS_gb
  110.     @mo_actor_gague_bar.each{|gb| gb.dispose}
  111.   end
  112.   #--------------------------------------------------------------------------
  113.   # ● 更新值槽活动块
  114.   #--------------------------------------------------------------------------
  115.   def update_mo_hzhjHBS_gb
  116.     @mo_actor_gague_bar.each{|gb| gb.update}
  117.   end
  118. end
  119. #==============================================================================
  120. # ■ Window_BattleStatus
  121. #==============================================================================
  122. class Window_BattleStatus
  123.   #--------------------------------------------------------------------------
  124.   # ● 刷新
  125.   #--------------------------------------------------------------------------
  126.   alias :mo_gb_hzhjHBS_refresh :refresh
  127.   def refresh
  128.     mo_gb_hzhjHBS_refresh
  129.     SceneManager.scene.instance_variable_get("@spriteset").update_mo_hzhjHBS_gb
  130.   end
  131. end
复制代码




第二个
  1. #==============================================================================#
  2. # 角色遇到不能通行的地方(包括图块和事件)发出提示音
  3. # 没有需要设定的地方,贴在Main之上即可
  4. #                                                                   2014.01.26 #
  5. #==============================================================================#
  6. #==============================================================================
  7. # ■ MoCrashSound
  8. #==============================================================================
  9. module MoCrashSound
  10.   SoundLenth = 2 # 声音长度 秒
  11. end
  12. #==============================================================================
  13. # ■ Game_CharacterBase
  14. #==============================================================================
  15. class Game_CharacterBase
  16.   #--------------------------------------------------------------------------
  17.   # ● 初始化私有成员变量
  18.   #--------------------------------------------------------------------------
  19.   alias :mo_crash_buzzer_init_private_members :init_private_members
  20.   def init_private_members
  21.     mo_crash_buzzer_init_private_members
  22.     @time_out = Graphics.frame_count
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 径向移动
  26.   #--------------------------------------------------------------------------
  27.   alias :mo_crash_buzzer_move_straight :move_straight
  28.   def move_straight(d, turn_ok = true)
  29.     mo_crash_buzzer_move_straight(d, turn_ok)
  30.     time_passed = Graphics.frame_count - @timeout
  31.     time_needed = MoCrashSound::SoundLenth * Graphics.frame_rate
  32.     if !@move_succeed && time_passed > time_needed
  33.       @timeout = Graphics.frame_count
  34.       Sound.play_buzzer
  35.     end
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 斜向移动
  39.   #--------------------------------------------------------------------------
  40.   alias :mo_crash_buzzer_move_diagonal :move_diagonal
  41.   def move_diagonal(horz, vert)
  42.     mo_crash_buzzer_move_diagonal(horz, vert)
  43.     time_passed = Graphics.frame_count - @timeout
  44.     time_needed = MoCrashSound::SoundLenth * Graphics.frame_rate
  45.     if !@move_succeed && time_passed > time_needed
  46.       @timeout = Graphics.frame_count
  47.       Sound.play_buzzer
  48.     end
  49.   end
  50. end
复制代码
萌新瑟瑟发抖
看到我请叫我去干活
回复

使用道具 举报

梦石
0
星屑
55
在线时间
79 小时
注册时间
2013-1-15
回帖
76
发表于 2014-1-25 10:38:15 | 显示全部楼层
第一个问题  稍微改动一下脚本就行  第二个问题 没注意过
回复

使用道具 举报

梦石
0
星屑
9973
在线时间
1649 小时
注册时间
2012-6-6
回帖
306
 楼主| 发表于 2014-1-26 14:36:32 | 显示全部楼层
余烬之中 发表于 2014-1-25 00:14
第一个问题,这里 贴在后知后觉脚本的后面
第二个问题感觉说的不是很清楚,反正我先写了一个,不对再找我, ...

还是加你QQ吧
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部