查看: 1472|回复: 5

求教两句if脚本的写法,关于行动类型的

  [复制链接]
梦石
0
星屑
50
在线时间
231 小时
注册时间
2007-12-17
回帖
384
发表于 2008-2-13 18:38:37 | 显示全部楼层 |阅读模式

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

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

×
如果现在活跃的战斗者,他行动的类型是攻击或者使用特技,那么........


如果现在活跃的战斗者,他行动的类型是使用物品或者防御,那么.........
版务信息:本贴由楼主自主结贴~

酱油的

梦石
0
星屑
1840
在线时间
2161 小时
注册时间
2007-12-22
回帖
3216

贵宾

发表于 2008-2-13 20:54:27 | 显示全部楼层
if @active_battler.current_action.kind < 2
else
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

梦石
0
星屑
50
在线时间
231 小时
注册时间
2007-12-17
回帖
384
 楼主| 发表于 2008-2-13 21:38:19 | 显示全部楼层
if @active_battler.current_action.kind < 2  是指什么呢?

是指第一个攻击或者使用特技?还是第二个使用物品或者防御??
回复

使用道具 举报

梦石
0
星屑
50
在线时间
36 小时
注册时间
2006-8-4
回帖
373
发表于 2008-2-13 23:34:58 | 显示全部楼层
if @active_battler.current_action.basic == 0 and
   @active_battler.current_action.kind == 0           #普通攻击

end


if @active_battler.current_action.kind == 1    #特技

end


if @active_battler.current_action.kind == 2    #物品

end
哟~迷路了~
回复

使用道具 举报

梦石
0
星屑
50
在线时间
231 小时
注册时间
2007-12-17
回帖
384
 楼主| 发表于 2008-2-14 00:10:36 | 显示全部楼层
以下引用魔影于2008-2-13 15:34:58的发言:

if @active_battler.current_action.basic == 0 and
  @active_battler.current_action.kind == 0           #普通攻击

end


if @active_battler.current_action.kind == 1    #特技

end


if @active_battler.current_action.kind == 2    #物品

end



那么,如果行动的类型是攻击或者使用特技就可以写成下面这样???还有,防御应该怎么写?

if (@active_battler.current_action.basic == 0 and @active_battler.current_action.kind == 0) or (@active_battler.current_action.kind == 1)
回复

使用道具 举报

梦石
0
星屑
50
在线时间
36 小时
注册时间
2006-8-4
回帖
373
发表于 2008-2-14 00:23:44 | 显示全部楼层
应该可以,


if @active_battler.current_action.basic == 1 and
@active_battler.current_action.kind == 0         #防御
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
哟~迷路了~
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部