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

Project1

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

[战斗相关] 某些角色不参与战斗

[复制链接]
梦石
0
星屑
89
在线时间
900 小时
注册时间
2012-11-13
帖子
893
跳转到指定楼层
1
发表于 2014-7-3 08:19:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 3106345123 于 2014-7-3 08:26 编辑

使用方法见注释
发现地址by@柳柳

  1. #======================================================
  2. # 某些角色不参与战斗,柳柳@66rpg.com
  3. #======================================================
  4. class Scene_Battle
  5.   #====================================================
  6.   # 不参与战斗的编号写在这里
  7.   #====================================================
  8.   I_AM_NPC = [1, 2, 3]
  9.   
  10.   
  11.   
  12.   # 不参与战斗的角色,进入战斗的时候临时轰走
  13.   alias o_start start unless $@
  14.   def start
  15.     @no_fight = []
  16.     for aid in I_AM_NPC
  17.       if $game_party.members.include?($game_actors[aid])
  18.         @no_fight.push(aid)
  19.         $game_party.remove_actor(aid)
  20.       end
  21.     end
  22.     o_start
  23.   end
  24.   
  25.   # 被轰走的角色,结束战斗的时候叫回来
  26.   alias o_terminate terminate unless $@
  27.   def terminate
  28.     o_terminate
  29.     for aid in @no_fight
  30.       $game_party.add_actor(aid)
  31.     end
  32.   end
  33.   
  34. end
复制代码
废弃
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-5-10 07:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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