魔兽地图编辑器吧 关注:65,051贴子:3,836,510
  • 5回复贴,共1

有个新手问我bj_wantDestroyGroup = true 能不能清单位组

只看楼主收藏回复

这里我确认一下
例如这个函数 单位组添加单位组
function GroupAddGroup takes group sourceGroup, group destGroup returns nothing // If the user wants the group destroyed, remember that fact and clear
// the flag, in case it is used again in the callback.
local boolean wantDestroy = bj_wantDestroyGroup
set bj_wantDestroyGroup = false
set bj_groupAddGroupDest = destGroup
call ForGroup(sourceGroup, function GroupAddGroupEnum)
// If the user wants the group destroyed, do so now.
if (wantDestroy) then
call DestroyGroup(sourceGroup)
endif
endfunction
如果我的理解没错
在这些带有这个布尔值的函数开头
都会把这个布尔值
先局部记录然后设置为默认值false
换言之在单位组前面加上一句
set bj_wantDestroyGroup = true 是可以起到在某些单位组函数内清单位组的作用的
是这样的吗。
求各位的看法


1楼2013-08-26 22:53回复
    的确是这样哒


    IP属地:浙江2楼2013-08-26 22:56
    收起回复


      IP属地:北京来自Android客户端3楼2013-08-26 23:06
      回复
        喵咪大神?


        IP属地:广东来自Android客户端4楼2013-08-27 09:43
        收起回复