• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] DummyCasting doesn't use the proper special effects

Level 7
Joined
Oct 19, 2024
Messages
55
I've been trying out to make custom spells: Mostly giving auto-casting to weaker versions of normal abilities - but whenever I use a dummy in order to cast the spell, it uses the sepcial effect of the original spell; instead of the animation for the custom one.

The spell itself works properly, since the benefits are accurate with the modified parameters, but it uses the wrong effect.

Here; an example:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Protection of the Earth
  • Actions
    • Set PTarget = (Target unit of ability being cast)
    • Set PLoc = (Position of PTarget)
    • Unit - Create 1 DUMMY for Player 1 (red) at PLoc facing Default building view degrees
    • Set DUMMY = (Last created unit)
    • Custom script: call RemoveLocation(udg_PLoc)
    • Unit - Add ProtectionoftheEarthShell (Dummy) to DUMMY
    • Unit - Order DUMMY to Undead Banshee: Anti-magic Shell PTarget
    • Unit - Remove DUMMY from the game
In this case, Protection of the Earth is a modified version of Anti-Magic Shell; with reduced absorption and duration, and which also uses the Tranquility (Target) as an effect.

The dummy correctly launches the spell: It absorbs the correct amount of damage and lasts the custom time; but uses the original Anti-Magic Shell effect! Does anyone know why does this happen, and how to fix it?
 
1. Some abilities are bugged where they always use the Art from the original ability. For example, I recall Death Coil's "special" art having the same problem. This sounds like the issue at hand and there's no great solution through the Object Editor. You can always trigger the Special Effect yourself though.

2. Some of the Art comes from the Buff, make sure you've set that up correctly. You often want to create a new Buff to go along with your new Ability.

3. You're immediately removing the Dummy unit. I don't see how that could work since unit's can't cast spells instantly (some exceptions like Berserk exist so maybe AMS is one of those). There's going to be a ~1 frame delay, so if you Remove the Dummy immediately it won't be able to finish it's Order. That's why everyone uses a Generic expiration timer to delay the removal:
  • Unit - Add a 0.20 second Generic expiration timer to DUMMY
The duration of the expiration timer should outlast the "delay" it takes for the ability to successfully make contact or "do it's thing". For Anti-Magic Shell, since it doesn't use a missile and isn't channeled, 0.20 seconds will do the trick. For Storm Bolt, you'll want to account for the missile speed and the overall delay it can take to make contact. That allows for proper damage and kill credit.

4. People often have the wrong setup for their Dummy units. Here's the correct design for a NON-MOVING Dummy unit, which is one used to cast spells as quickly as possible:

Copy and paste the Locust, Set Model = None, Shadow = None, Attacks Enabled = None, Movement Type = None, Speed Base = 0, Flying Height = 0, Cast Point = 0, Cast Backswing = 0. You can also play around with it's Art fields and use a custom Dummy model to get access to Attachment Points. Those points are useful if the ability the Dummy casts references the caster's "origin" or "overhead" for instance.

Cast Point = The delay before an ability will actually cast, allowing the unit's cast animation to sync with the execution of the ability.
Cast Backswing = How long the unit continues playing the rest of it's cast animation after the execution of the ability. It will ignore some behavior during this time, but you can manually interrupt it, aka animation cancelling.
 
Last edited:
1. Some abilities are bugged where they always use the Art from the original ability. For example, I recall Death Coil's "special" art having the same problem. This sounds like the issue at hand and there's no great solution through the Object Editor. You can always trigger the Special Effect yourself though.
Oh, well, then it seems that my luck is rotten, because that explains why most of the custom spells where not triggering the proper effect, despite working fine. I suppose there isn't any way to make them not use the effect, at the very least?


2. Some of the Art comes from the Buff, make sure you've set that up correctly. You often want to create a new Buff to go along with your new Ability.
This gave me the idea of at least giving the special effect to the actual casting ability instead of the dummy one, which at least triggers the custom effect, even if it stacks with the effect from AMS.


3. You're immediately removing the Dummy unit. I don't see how that could work since unit's can't cast spells instantly (some exceptions like Berserk exist so maybe AMS is one of those). There's going to be a ~1 frame delay, so if you Remove the Dummy immediately it won't be able to finish it's Order. That's why everyone uses a Generic expiration timer to delay the removal:
  • Unit - Add a 0.20 second Generic expiration timer to DUMMY
The duration of the expiration timer should outlast the "delay" it takes for the ability to successfully make contact or "do it's thing". For Anti-Magic Shell, since it doesn't use a missile and isn't channeled, 0.20 seconds will do the trick. For Storm Bolt, you'll want to account for the missile speed and the overall delay it can take to make contact. That allows for proper damage and kill credit.
Not a problem I had run into, but thanks for the advice! I'll keep it in mind from now on.

As for the dummy itself, it seems to work fine, so no problem there. Another thing that irks me is that the tooltips for both status effects also stack, which I think there is no way of solving?

(Also, do you know any other spells that are bugged? Shadowstrike, Slow Poison, Bloodlust and Inner Fire are also giving me issue.)
 
Note that you're on an older version so some of this might not apply. But assume it does.

If MOST of your custom spells are not triggering the proper effects then it's more likely user error and not a bug. Because only a small handful of abilities have the issue I described. I can't remember which ones but it should be pretty obvious when you test and see the wrong Model being used.

So it sounds like your issue is tied to:
1. Removing the Dummy immediately.
2. The Dummy model lacking the necessary Attachment Points.

Remember that any Art that is "attached" to a Unit (Dummy in this case) will be removed along with the removal of the Unit. Triggered Special Effects might break this rule but I believe that the Art in the Object Editor is hardcoded to get removed along with it's host.

Also, I would ensure a proper Dummy setup because an improper one can still cast spells - just with an extra delay before casting. This is due to needing to turn to face the target and/or a delay due to Cast Point. It's an easy fix that will make the map feel more responsive and can even fix certain bugs in your "custom spell" triggers.

You can attach your map or a demo of your setup if you'd like, then I can pinpoint the issue.
 
Last edited:
I've made sure that the dummy was configured correctly - it was. I also tried using the dummy model you provided, but it didn't fix the issue.

Note that you're on an older version so some of this might not apply. But assume it does.

If MOST of your custom spells are not triggering the proper effects then it's more likely user error and not a bug. Because only a small handful of abilities have the issue I described. I can't remember which ones but it should be pretty obvious when you test and see the wrong Model being used.
Honestly, I'm starting to suspect that this might be it: The spells work fine, it's just the effects that are buggy; but I do have an oldish and inadequatly installed version, so...

Since I have no way of personally checking it myself, I'd like to take upon your kind offer of seeing the test map. I removed most of the fluff units, leaving only the baseline, among which I've left the most troublesome units.

Mind you, I did this map almost a year ago, so there's plenty of stuff that could be done better, but it works fine except for this main issue. I've placed the buggy triggers in a separate folder in the trigger editor, along with a short description; as well as a copy of the unworking units in the map.

I am very grateful for your aid, it is very helpful.
 

Attachments

Okay, so I see a lot of issues with how you've set things up.

1. I would create a new Dummy unit using the instructions I gave before. The Locust has 95% of the settings you need from the very start.

2. Looking at the Object Editor, your Dummy abilities need to be properly setup so that they have a 100% chance of successfully casting. For example, I've modified StingerDummy to have infinite Cast Range and 0 Mana Cost:
1760040159496.png

Other things to consider: Tech Requirements, Targets Allowed, Casting Time, Missile Speed.
(Shadow Strike is unique and uses Casting Time for something entirely different so ignore that in this case)

3. Looking at your Anti-Magic Shell ability, your Buffs field was empty. The idea is to use your own custom variations of the existing Buffs:
1760040775148.png

Your other Dummy abilities seemed to have the same issue. You're supposed to create copies of the original Buffs, edit them to have the Name/Art that you want for your new version of the Ability, and then assign them to that new Ability.

4. Then for your Dummy related triggers, I would design them like this:
  • ProtectionoftheEarth
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Protection of the Earth
    • Actions
      • Set VariableSet PTarget = (Target unit of ability being cast)
      • Set VariableSet PLoc = (Position of PTarget)
      • Unit - Create 1 Dummy (Caster) for (Triggering player) at PLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_PLoc)
      • Set VariableSet DUMMY = (Last created unit)
      • Unit - Add ProtectionoftheEarthShell (Dummy) to DUMMY
      • Unit - Add a 0.20 second Generic expiration timer to DUMMY
      • -------- Always issue the Order as the last thing you do with the Dummy: --------
      • Unit - Order DUMMY to Undead Banshee - Anti-magic Shell PTarget
  • EnhanceNew
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enhance
    • Actions
      • Set VariableSet ETarget = (Target unit of ability being cast)
      • Set VariableSet ELoc = (Position of ETarget)
      • Unit - Create 1 Dummy (Caster) for (Triggering player) at ELoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ELoc)
      • Set VariableSet DUMMY = (Last created unit)
      • Unit - Add EnhanceAttackSpeed (Dummy) to DUMMY
      • Unit - Add EnhanceCastDamage (Dummy) to DUMMY
      • Unit - Add a 0.20 second Generic expiration timer to DUMMY
      • -------- Always issue the Order as the last thing you do with the Dummy: --------
      • Unit - Order DUMMY to Human Priest - Inner Fire ETarget
      • Unit - Order DUMMY to Orc Shaman - Bloodlust ETarget
For Stinger, you don't need the "StingerCheck" Boolean. Instead, you can turn StingerChance off by default and turn it back on once the tech has been researched:
  • StingerCheck
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Stinger
    • Actions
      • Trigger - Turn on StingerChance <gen>
Set Initially On = False.
1760042338750.png

  • StingerChance
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Stinger for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 5) Equal to 5
    • Actions
      • Set VariableSet STarget = (Attacked unit)
      • Set VariableSet SLoc = (Position of STarget)
      • Unit - Create 1 Dummy (Caster) for (Owner of (Attacking unit)) at SLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_SLoc)
      • Set VariableSet DUMMY = (Last created unit)
      • Unit - Add StingerDummy (Dummy) to DUMMY
      • Unit - Add a 20.00 second Generic expiration timer to DUMMY
      • -------- Always issue the Order as the last thing you do with the Dummy: --------
      • Unit - Order DUMMY to Night Elf Warden - Shadow Strike STarget
Final Notes:
  • I set the Expiration Timers to values that help guarantee success. For example, StingerDummy's Shadow Strike ability lasts 15 seconds so I went with a 20 second expiration to allow enough time for the full effects to occur plus an extra buffer for good measure.
  • I reordered and modified some Actions and Conditions as to avoid potential issues. For example, your Stinger ability will now work for any Unit that has the ability instead of checking if it's specifically a Wind Rider.
  • Dummy abilities should have 0 Mana Cost, 99999 Cast Range, etc. Design them so that they're guaranteed to work. Cooldown should be 0 if the ability is cast multiple times at once (not the case here).
  • I ensured that the Dummy units were owned by the Player that was creating them (the caster/attacker).
  • Setting an abilities Missile Speed to 0 (StingDummy comes to mind) will make the missile hit it's target "instantly". This is useful if you want the effects to occur as quickly as possible.
  • Ensure that you've imported the correct Dummy model. I believe you did but the path should be "dummy.mdx".
  • I only looked at the triggers in that one folder.
 
Last edited:
3. Looking at your Anti-Magic Shell ability, your Buffs field was empty. The idea is to use your own custom variations of the existing Buffs:
View attachment 551103
Your other Dummy abilities seemed to have the same issue. You're supposed to create copies of the original Buffs, edit them to have the Name/Art that you want for your new version of the Ability, and then assign them to that new Ability.

Okay, this point in particular has been very useful! I did not get the anti-magic shell to work properly (I'll assume it's one of the bugged ones), but I did manage with the other abilities. I did not know that you have to place your edited buffs in both the new ability and the dummy one, but that seemed to do the trick. Apparently, if you leave the field empty, it just calls the original effect.

I'll also implement the rest of the changes: Seems useful, and I had no idea that even half of that could become an issue. Especially the timed life thing; or the fact that special effects can be sometimes attached to the dummy caster.
I have to thank you again; your help has been extremely useful.
 
Back
Top