[JASS] Delayed spell casting: Create Illusion?

Status
Not open for further replies.

fefeoxy

F

fefeoxy

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!
 
As I do not know this spell...
If you may describe what the appropriated effects are, I may recover how to do this.
 
Hi,

I fixed the delayed problem by setting the dummy caster's cast point to 0.0. The other 2 problem with collision still remains.

Doppelwalk creates an image of yourself right on the spot while you become invisible and walk away; a delusional skill.

The problem I have is "creating an image right on top of the hero" because either me or my image shifts out of each other's way to avoid collision. In DotA this does not happen; you cast the spell and you can transit smoothly out of your image (instead of abruptly).
 
Try modifying these attributes of your illusion:
- <movetp> to "fly"
- <elevPts> to 0

Hostile units have to be able to attack flying units for this to work but it is the easiest way.

Alternately it may also work if you simply set <collision> to 0.00 and leave the other attributes untouched but I am not sure about that.

postscript:
An other possibility could be to set unitPathing for both hero and illusion to false for a second.
 
Status
Not open for further replies.
Back
Top