wellwish3r
wishes wells.
- Reaction score
- 52
This ought to be simple, but i just cant figure out the problem >.>
the unit is created, but it refuses to attack. I do not know why (It has an enables attack, and when i walk into its acquisition range, it attacks me...)
JASS:
function WlfCond takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit()) == 039;n00G039; then
return true
endif
return false
endfunction
function WlfAct takes nothing returns nothing
local unit u = GetKillingUnit()
local location loc = GetRectCenter(gg_rct_SpawnPrideLeader)
local unit l = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE),039;n00F039;,loc,90.00)
call IssueTargetOrder(l,"attack",u)
call UnitApplyTimedLife(l,039;BTLF039;,99.00)
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Wolfmother takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(t,Condition(function WlfCond))
call TriggerAddAction( t, function WlfAct )
endfunction
the unit is created, but it refuses to attack. I do not know why (It has an enables attack, and when i walk into its acquisition range, it attacks me...)