• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Dummy Unit don't cast spell at the same time with hero and idk why

Level 13
Joined
Sep 11, 2013
Messages
488
Greetings!

I found a weird problem with my trigger.
  • Shadow Strike WISP 0 MS
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Infernal WISP 0 MS
      • (Ability being cast) Equal to Shadow Strike - INT Channel
    • Actions
      • Game - Display to (All players) the text: WISP 0 MS
      • Unit - Create 1 Wisp Shadow Strike Dummy 0 MS for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Angle from (Position of (Casting unit)) to (Position of (Target unit of ability being cast))) degrees
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Shadow Strike XXX to (Last created unit)
      • Unit - Set level of Shadow Strike XXX for (Last created unit) to (Level of Shadow Strike - INT Channel for (Casting unit))
      • Unit - Order (Last created unit) to Neutral - Parasite (Target unit of ability being cast)
So, the problem is that this dummy unit has a spell (Shadow Strike XXX) that has even more cast range than my Hero spell (Shadow Strike - INT Channel) and if the enemy unit is running away from me, but somehow I manage to cast the hero spell at maximum cast range while the enemy unit is running away, the dummy (even with 100 bonus cast range on his spell) will not release the spell on that enemy unit. Why my dummy is not cast his spell in the same time with my hero? (In this case Dummy WISP has 0 Movement Speed)

In the second case, I set Dummy WISP movement speed to 522)
Now, When I cast the spell with my hero in the same scenario, The dummy unit will start to move to the enemy unit and then release his spell.
That's make no sense for me because dummy has more cast range than me on his spell. The only explanation is that, there is a delay between spells.

BUT I tested that with the same spell on both units and seems to be instant while the enemy is not moving.
BUT When the enemy is moving, the spells are no more instant and work only on Hero. :peasant-confused:

Here is an example of dummy with 0 ms and dummy with 522 ms behavior.


If I put global cast range on dummy spell, there is another problem because if an enemy unit blink away or teleports imediately after I start casting the hero spell, the dummy spell will go the entire map after that enemy and I don't want that. What I wish is simple.. If hero manage to cast the spell and enemy blink or teleport, the poison/missile must miss the enemy. Also, If hero manage to cast the spell, the dummy must launch the second spell at the same time.

How can I do that?

I attached the map with samples.

The help will be appreciated!
 

Attachments

  • Shadow Strike delay BUG.w3m
    19.4 KB · Views: 4
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
488
Is there a reason you give such a short specific range to your dummy spell? Sure it's higher than the hero's spell but you could give it e.g. 5000 range and it'll most likely solve the issue
As I said here
If I put global cast range on dummy spell, there is another problem because if an enemy unit blink away or teleports imediately after I start casting the hero spell, the dummy spell will go the entire map after that enemy and I don't want that. What I wish is simple.. If hero manage to cast the spell and enemy blink or teleport, the poison/missile must miss the enemy. Also, If hero manage to cast the spell, the dummy must launch the second spell at the same time.
This is the problem.

I still don't understand why my dummy refuse to cast the spell at the same time with my hero when the enemy is moving.. If the hero has enough range to cast the spell, why the dummy refuse to cast the spell even with bigger range?
 
Level 29
Joined
Sep 26, 2009
Messages
2,612
You may have increased dummy's spell range by 100, but that is too low.
Simply put, you may have set dummy's cast point to 0.00, but you have ignored caster's Cast point. Caster's cast point offsets time when dummy is created.
  • Your caster's cast point is 0.3 seconds.
  • Your mortar team unit is moving at 450.00 speed per second, that means it will move 135.00 range over the 0.3 second duration.

So even if your dummy unit's cast range is increased by 100 range, it will be of no use because the dummy unit is created after 0.3 seconds since caster started the spell, and during those 0.3 seconds mortar team moves away by 135.00 range, getting outside dummy's increased cast range.
 
Level 24
Joined
Feb 27, 2019
Messages
843
Theres a gameplay constant called: Spells - Target Motion Allowance (default 300 range). Its a gameplay mechanic which allows spells that have begun casting an additional 300 range until it starts the effect. Without it units would just run after the target, try to cast but fail cuz instantly out of range and repeat.

The problem you are talking about exists in vanilla and possibly all custom games but its such a rare event that basically must be triggered by something like Starts the effect -> Move target unit of ability being cast to point. When the event occurs you can consider that the missile will be spawned and will hit its target. I guess blink and possibly teleport has inbuilt behaviour to nullify missiles so if a missile is cast and the target blinks, the missile will miss the target. You may possibly be able to do some stupid shit with these abilities to nullify a missile but as I said what youre talking about is vanilla behaviour already and probably wont happen ever.

Anyway if you add 300 range to the dummy ability itll probably behave as excpected.
 
Level 13
Joined
Sep 11, 2013
Messages
488
Have you changed the dummy animation - cast point and animation - backswing value in object editor? they must be 0.00.
Yes, they are and were 0 when I tested in that video.
You may have increased dummy's spell range by 100, but that is too low.
Simply put, you may have set dummy's cast point to 0.00, but you have ignored caster's Cast point. Caster's cast point offsets time when dummy is created.
  • Your caster's cast point is 0.3 seconds.
  • Your mortar team unit is moving at 450.00 speed per second, that means it will move 135.00 range over the 0.3 second duration.

So even if your dummy unit's cast range is increased by 100 range, it will be of no use because the dummy unit is created after 0.3 seconds since caster started the spell, and during those 0.3 seconds mortar team moves away by 135.00 range, getting outside dummy's increased cast range.
That makes a lot of sense. Thank you for explanation, but the problem is still there even if I set the Caster like a dummy with cast point to 0.00. The dummy still has +100 bonus cast range on that spell, but don't cast the spell. I think this is a bug or we miss something.

Theres a gameplay constant called: Spells - Target Motion Allowance (default 300 range). Its a gameplay mechanic which allows spells that have begun casting an additional 300 range until it starts the effect. Without it units would just run after the target, try to cast but fail cuz instantly out of range and repeat.

The problem you are talking about exists in vanilla and possibly all custom games but its such a rare event that basically must be triggered by something like Starts the effect -> Move target unit of ability being cast to point. When the event occurs you can consider that the missile will be spawned and will hit its target. I guess blink and possibly teleport has inbuilt behaviour to nullify missiles so if a missile is cast and the target blinks, the missile will miss the target. You may possibly be able to do some stupid shit with these abilities to nullify a missile but as I said what youre talking about is vanilla behaviour already and probably wont happen ever.

Anyway if you add 300 range to the dummy ability itll probably behave as excpected.

I didn't know about that Target Motion Allowance. Hmm.. Interesting. Thank you for explanation. However, from what I understand, If I set caster's cast point to 0.00, the Target Motion Allowance will be 0 in that case, no? But somehow the dummy still refuse to cast the spell even with +100 bonus cast range..

Why this happen? Is this a bug? :peasant-confused: :peasant-confused: :peasant-confused:
 
Level 24
Joined
Feb 27, 2019
Messages
843
I didn't know about that Target Motion Allowance. Hmm.. Interesting. Thank you for explanation. However, from what I understand, If I set caster's cast point to 0.00, the Target Motion Allowance will be 0 in that case, no? But somehow the dummy still refuse to cast the spell even with +100 bonus cast range..

Why this happen? Is this a bug? :peasant-confused: :peasant-confused: :peasant-confused:
The Target Motion Allowance is always 300 as long as the spell has begun casting within the spells Cast Range. The time from begins casting to the event Starts the effect of an ability is Cast Point. During the Cast Point who knows how far the target will travel, as long as it doesnt travel further away than Cast Range + 300 the event Starts the effect of an ability will occur which should trigger the dummy to cast its ability because the ability was successfully cast but if when the dummy begins casting the target is not within the dummy abilitys Cast Range, it will not be cast. The Target Motion Allowance is only applied when the ability has begun casting within the Cast Range.
 
Level 13
Joined
Sep 11, 2013
Messages
488
The Target Motion Allowance is always 300 as long as the spell has begun casting within the spells Cast Range. The time from begins casting to the event Starts the effect of an ability is Cast Point. During the Cast Point who knows how far the target will travel, as long as it doesnt travel further away than Cast Range + 300 the event Starts the effect of an ability will occur which should trigger the dummy to cast its ability because the ability was successfully cast but if when the dummy begins casting the target is not within the dummy abilitys Cast Range, it will not be cast. The Target Motion Allowance is only applied when the ability has begun casting within the Cast Range.
I understand that, but my Event Caster and my dummy has both 0.00 cast point right now. Caster has 475 cast range and Dummy has 575 cast range. As long as both has cast point 0.00, why the dummy didn't cast his spell to the enemy while the enemy is moving (is still out of cast range, but why) ? I did the math and makes no sense.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,931
I understand that, but my Event Caster and my dummy has both 0.00 cast point right now. Caster has 475 cast range and Dummy has 575 cast range. As long as both has cast point 0.00, why the dummy didn't cast his spell to the enemy while the enemy is moving (is still out of cast range, but why) ? I did the math and makes no sense.
Your Dummy unit is likely not setup correctly. Here's an example map with an ideal Dummy unit for this type of spellcasting.
  • Hero Storm Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt (Hero)
    • Actions
      • Unit - Create 1 Dummy for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Storm Bolt (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Note that I didn't bother dealing with the memory leaks in any of the triggers.

But if you need a Dummy unit to act like a Missile or be repositioned during your trigger(s) then you'll have to change it's Movement settings. This adjustment will prevent it from being able to cast spells "instantly", so you'll want to choose the correct type of Dummy for the job.
 

Attachments

  • Dummy Example 1.w3m
    24.9 KB · Views: 0
Last edited:
Top