|
function SelectSecurityTeam takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='z005'
endfunction
function EngineerAtSiteConditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='z003'
endfunction
function EngineerAtSite takes nothing returns nothing
local location l = GetUnitLoc(GetTriggerUnit())
local group g = AMGetUnitsInRange(600, l, Condition(function SelectSecurityTeam))
local unit u = FirstOfGroup(g)
call IssuePointOrder(u,"patrol",GetRectCenterX(gg_rct_Residence41),GetRectCenterY(gg_rct_Residence41))
set udg_EngineersOnSite = udg_EngineersOnSite + 1
call MBSet( udg_SquadStatus,1,1,"单位正在到来中 : " + I2S(udg_EngineersOnSite))
call RemoveUnit(GetTriggerUnit())
call StartSound(gg_snd_Loading)
call DestroyGroup(g)
call RemoveLocation(l)
set l = null
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_Engineer_Arrives takes nothing returns nothing
set gg_trg_Engineer_Arrives = CreateTrigger()
call TriggerAddCondition( gg_trg_Engineer_Arrives, Condition( function EngineerAtSiteConditions ) )
call TriggerAddAction(gg_trg_Engineer_Arrives,function EngineerAtSite)
endfunction
谁看看这段jass哪有错?
原本是刷单位后移动到指定地点
但是不起作用,单位只原地发呆
另外..求修改方法.. |
|