- Joined
- Jul 15, 2007
- Messages
- 36
Dear all, sorry to bother....
Trying to create a summoned unit, which has the "raise dead" timeout (blue bar thingy) on it, and then have it die 2 seconds later. I thought I would be using:
(or call UnitApplyTimedLifeBJ( 2.00, 'BUan', dummy ) )
but doesn't seem to do what I want... do I need to add the ability/buff 'BUan' or 'Brai' to the unit? i.e. (doesn't seem to work
thank-you for your help
*edit - changed to native
Trying to create a summoned unit, which has the "raise dead" timeout (blue bar thingy) on it, and then have it die 2 seconds later. I thought I would be using:
JASS:
function Undead_Actions takes unit u, integer level returns nothing
local location loc = GetUnitLoc(u)
local integer uid
local unit dummy
if level == 1 then
set uid = 'u001'
endif
if level == 2 then
set uid = 'u002'
endif
if level == 3 then
set uid = 'u003'
endif
if level == 4 then
set uid = 'u004'
endif
if level == 5 then
set uid = 'u005'
endif
if level == 6 then
set uid = 'u000'
endif
call CreateUnitAtLoc(Player(0), uid, loc, 270.0)
set dummy = GetLastCreatedUnit()
call IssuePointOrderLoc(dummy, "attack", loc)
call UnitApplyTimedLife( dummy, 'Brai', 2.0 )
set dummy = null
call RemoveUnit(dummy)
call RemoveLocation(loc)
endfunction
(or call UnitApplyTimedLifeBJ( 2.00, 'BUan', dummy ) )
but doesn't seem to do what I want... do I need to add the ability/buff 'BUan' or 'Brai' to the unit? i.e. (doesn't seem to work
JASS:
function Undead_Actions takes unit u, integer level returns nothing
local location loc = GetUnitLoc(u)
local integer uid
local unit dummy
if level == 1 then
set uid = 'u001'
endif
if level == 2 then
set uid = 'u002'
endif
if level == 3 then
set uid = 'u003'
endif
if level == 4 then
set uid = 'u004'
endif
if level == 5 then
set uid = 'u005'
endif
if level == 6 then
set uid = 'u000'
endif
call CreateUnitAtLoc(Player(0), uid, loc, 270.0)
set dummy = GetLastCreatedUnit()
call IssuePointOrderLoc(dummy, "attack", loc)
call UnitAddAbility(dummy, 'Brai')
call UnitApplyTimedLife( dummy, 'Brai', 2.0 )
set dummy = null
call RemoveUnit(dummy)
call RemoveLocation(loc)
endfunction
thank-you for your help
*edit - changed to native