这个用loop循环能实现玩家2也返回基地吗
魔兽地图编辑器吧
全部回复
仅看楼主
level 6
冰蓝幻影 楼主
function Trig_Go_to_Base_Conditions takes nothing returns boolean
return((GetOwningPlayer(GetEnteringUnit())==Player(0))and(IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO)))!=null
endfunction
改成
function Trig_Go_to_Base_Conditions takes nothing returns boolean
local integer i=0
loop
exitwhen i==2
return((GetOwningPlayer(GetEnteringUnit())==Player(0))and(IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO)))!=null
set i=i+1
endloop
endfunction
2017年04月13日 14点04分 1
level 13
不能
2017年04月13日 14点04分 2
level 14
…喵呜不会j
2017年04月13日 15点04分 3
不会你都要水一下[哈哈]我也跟着水
2017年04月13日 16点04分
level 7
[哈哈]
2017年04月13日 16点04分 4
level 12
遇到第一个return就结束了
2017年04月13日 23点04分 6
level 11
return出去了,后面的i++表示怪我咯
2017年04月15日 08点04分 7
level 6
返回值只能有1个
2017年04月16日 08点04分 8
1