查看: 1440|回复: 2

[已经解决] 如何在战斗中显示攻击的帮助

[复制链接]
梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
回帖
10960

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

发表于 2012-12-23 13:31:19 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 美丽晨露 于 2012-12-23 21:05 编辑

就是角色敌人发动攻击时
会在上方弹出帮助框
“使用者发动攻击”的帮助
像使用特技一样的那个帮助
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
回帖
3515
发表于 2012-12-23 17:43:44 | 显示全部楼层
  1. class Scene_Battle
  2.   def make_basic_action_result
  3.     if @active_battler.current_action.basic == 0
  4.       @animation1_id = @active_battler.animation1_id
  5.       @animation2_id = @active_battler.animation2_id
  6.       if @active_battler.is_a?(Game_Enemy)
  7.         if @active_battler.restriction == 3
  8.           target = $game_troop.random_target_enemy
  9.         elsif @active_battler.restriction == 2
  10.           target = $game_party.random_target_actor
  11.         else
  12.           index = @active_battler.current_action.target_index
  13.           target = $game_party.smooth_target_actor(index)
  14.         end
  15.       end
  16.       if @active_battler.is_a?(Game_Actor)
  17.         if @active_battler.restriction == 3
  18.           target = $game_party.random_target_actor
  19.         elsif @active_battler.restriction == 2
  20.           target = $game_troop.random_target_enemy
  21.         else
  22.           index = @active_battler.current_action.target_index
  23.           target = $game_troop.smooth_target_enemy(index)
  24.         end
  25.       end
  26.       @help_window.set_text(@active_battler.name + "发动攻击", 1)  #只加了这句
  27.       @target_battlers = [target]
  28.       for target in @target_battlers
  29.         target.attack_effect(@active_battler)
  30.       end
  31.       return
  32.     end
  33.     if @active_battler.current_action.basic == 1
  34.       @help_window.set_text($data_system.words.guard, 1)
  35.       return
  36.     end
  37.     if @active_battler.is_a?(Game_Enemy) and
  38.        @active_battler.current_action.basic == 2
  39.       @help_window.set_text("逃跑", 1)
  40.       @active_battler.escape
  41.       return
  42.     end
  43.     if @active_battler.current_action.basic == 3
  44.       $game_temp.forcing_battler = nil
  45.       @phase4_step = 1
  46.       return
  47.     end
  48.   end
  49. end
复制代码

评分

参与人数 1星屑 +66 收起 理由
hcm + 66 认可答案

查看全部评分


http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
回帖
10960

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

 楼主| 发表于 2012-12-23 21:04:56 | 显示全部楼层
Wind2010 发表于 2012-12-23 17:43

非常感谢啊
我已经琢磨了很久了
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部