Hi,
I'm trying to re-create Doppelwalk from DotA, except the illusions has several problems:
1. Does not spawn directly on top of the hero casting it.
2. If I use SetUnitPathing(hero, false) to force it to be placed directly on top, the hero would abruptly move out of the image to recover from unit collision.
3. it takes about half a second for the image to appear.
Here's a snippet of the code:
local unit d = CreateUnitAtLoc(GetOwningPlayer(c), Dummy_Unit(), GetUnitLoc(c), 0.)
call UnitAddAbility(d, Doppel_Image_Abi())
call SetUnitAbilityLevel(d, Doppel_Image_Abi(), level)
call SetUnitPathing(c, false)
call IssueTargetOrderById(d, 852274, c) //852274 - Create Image Order
call UnitApplyTimedLife(d, 'BTFL', 1.)
call SetUnitPathing(c, true)
Doppel_Image_Abi() contains the ability Id.
I did set cast time to 0
The area of effect is 0 (which controls where the image spawns)
set the ability to unit ability (unclicking item ability)
help is appreciated. Thanks!
I'm trying to re-create Doppelwalk from DotA, except the illusions has several problems:
1. Does not spawn directly on top of the hero casting it.
2. If I use SetUnitPathing(hero, false) to force it to be placed directly on top, the hero would abruptly move out of the image to recover from unit collision.
3. it takes about half a second for the image to appear.
Here's a snippet of the code:
local unit d = CreateUnitAtLoc(GetOwningPlayer(c), Dummy_Unit(), GetUnitLoc(c), 0.)
call UnitAddAbility(d, Doppel_Image_Abi())
call SetUnitAbilityLevel(d, Doppel_Image_Abi(), level)
call SetUnitPathing(c, false)
call IssueTargetOrderById(d, 852274, c) //852274 - Create Image Order
call UnitApplyTimedLife(d, 'BTFL', 1.)
call SetUnitPathing(c, true)
Doppel_Image_Abi() contains the ability Id.
I did set cast time to 0
The area of effect is 0 (which controls where the image spawns)
set the ability to unit ability (unclicking item ability)
help is appreciated. Thanks!