• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Dummy unit not casting ability even though manually it works

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

This is driving me crazy. I want to do something VERY basic, but for some reason the game refuses to execute it properly.

I want to order a dummy unit to cast Earthquake on a location. That's it. I spent the last 2 hours reducing the functions to the most fundamental level and narrow down the error, but nothing worked.

When I cast the ability, the dummy unit is correctly summoned and has the ability Earthquake. However, it simply refuses to cast it. I CAN cast it manually however (so mana cost ist no an issue).

Can anyone please tell me what is going wrong? Is this a bug?

  • TEST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Elemental Destruction
    • Actions
      • Unit - Create 1 Tauren for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Unit - Add Elemental Destruction (Earth) to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Earthquake (Target point of ability being cast)
      • Unit - Add a 10.50 second Generic expiration timer to (Last created unit)

Here also a pic from the dummy ability:

HbsB2Bt.png



Edit: Here also the main ability:
PpQbq6U.png
 
Last edited:
Level 14
Joined
Sep 28, 2011
Messages
968
Did you try adding the expiration timer before ordering the cast?
(I wonder if that might interrupt the order)
because it is the main difference between creating the dummy and manual casting and creating the dummy and issuing the order immediately: in the latter case the order is issued before the addition of the timer(which might be interrupting or something)
 
Last edited:
Level 14
Joined
Sep 28, 2011
Messages
968
Since the objective is doing the effect of earthquake ( :damaging buildings and slowing) could you simply give the dummy unit the two tornado auras abilities(one that is like immolation and targets buildings and the other who slows down units) with no graphisms then add the earthquake graphisms to the place?
if you really want earthquake the problem might be that for some reason it is not possible to cast it with an unit that just have been created(which can not be seen with manual cast).
Did you test launching a short timer and making the dummy cast the spell at the end of the timer?
Did you try giving the real orc hero earthquake and granting to the unit some mana then checking if it somehow still does not works (if it does not then eartquake is probably uncastable)
Also the ability might be written as earthquake but not count as having the real order id for some reason did you try displaying the order id of the ability when the unit is issued manually the order?
 
Level 12
Joined
May 16, 2020
Messages
660
Yes, I use the current patch.

And what the fuck: In my real spell (not the test above) I just changed something completely unrelated, and now it works (I added special effects). I honestly don't get it.

@noob : I tested a 0.01 wait, didn't help either.

This is the trigger for which *for some reason* it works now, even though I didn't touch the Earthquake part at all:

  • Elemental Destruction Loop Down
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ED_GroupFlying and do (Actions)
        • Loop - Actions
          • Set VariableSet ED_CV_Caster = (Custom value of (Picked unit))
          • Set VariableSet ED_Caster[ED_CV_Caster] = (Picked unit)
          • Set VariableSet ED_Height[ED_CV_Caster] = (ED_Height[ED_CV_Caster] - 400.00)
          • Animation - Change ED_Caster[ED_CV_Caster] flying height to ED_Height[ED_CV_Caster] at 1000000000.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ED_Height[ED_CV_Caster] Equal to 0.00
            • Then - Actions
              • Unit Group - Remove ED_Caster[ED_CV_Caster] from ED_GroupFlying.
              • Animation - Change ED_Caster[ED_CV_Caster]'s size to (100.00%, 100.00%, 100.00%) of its original size
              • -------- ADD EFFECTS --------
              • Special Effect - Create a special effect at ED_Point[ED_CV_Caster] using war3mapImported\MM20 StormforgerLightning.mdx
              • Special Effect - Destroy (Last created special effect)
              • Unit - Create 1 Thunderstruck (Below) for (Owner of ED_Caster[ED_CV_Caster]) at ED_Point[ED_CV_Caster] facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Set VariableSet ED_Dummy = (Last created unit)
              • For each (Integer ED_Integer) from 1 to 5, do (Actions)
                • Loop - Actions
                  • Unit - Create 1 Thunderstruck (Above) for (Owner of ED_Caster[ED_CV_Caster]) at ED_Point[ED_CV_Caster] facing Default building facing degrees
                  • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death ED_Dummy
                  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Special Effect - Create a special effect at ED_Point[ED_CV_Caster] using war3mapImported\WindCirclefaster.mdx
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at ED_Point[ED_CV_Caster] using war3mapImported\InvokerSS_Boom01.mdx
              • Special Effect - Destroy (Last created special effect)
              • -------- EARTHQUAKE --------
              • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of ED_Caster[ED_CV_Caster]) at ED_Point[ED_CV_Caster] facing Default building facing degrees
              • Set VariableSet ED_Dummy = (Last created unit)
              • Unit - Add a 10.50 second Generic expiration timer to ED_Dummy
              • Unit - Add Elemental Destruction (Earth) to ED_Dummy
              • Unit - Set level of Elemental Destruction (Earth) for ED_Dummy to (Level of Elemental Destruction for ED_Caster[ED_CV_Caster])
              • Unit - Order ED_Dummy to Orc Far Seer - Earthquake ED_Point[ED_CV_Caster]
              • -------- DAMAGE TARGETS AND KNOCKBACK --------
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 350.00 of ED_Point[ED_CV_Caster].) and do (Actions)
                • Loop - Actions
                  • Set VariableSet ED_Target = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ED_Target is alive) Equal to True
                      • (ED_Target is A structure) Equal to False
                      • (ED_Target is Magic Immune) Equal to False
                      • (ED_Target belongs to an enemy of (Owner of ED_Caster[ED_CV_Caster]).) Equal to True
                    • Then - Actions
                      • Set VariableSet ED_CV_Target = (Custom value of ED_Target)
                      • Set VariableSet ED_Point[1] = (Position of ED_Target)
                      • Set VariableSet ED_Angle[ED_CV_Target] = (Angle from ED_Point[ED_CV_Caster] to ED_Point[1])
                      • Set VariableSet ED_PullDistance[ED_CV_Target] = 0.00
                      • Unit - Cause ED_Caster[ED_CV_Caster] to damage ED_Target, dealing (150.00 + (100.00 x (Real((Level of Elemental Destruction for ED_Caster[ED_CV_Caster]))))) damage of attack type Spells and damage type Magic
                      • Unit Group - Add ED_Target to ED_GroupKnockback
                      • Custom script: call RemoveLocation (udg_ED_Point[1])
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Elemental Destruction Knockback <gen> is on) Equal to False
                • Then - Actions
                  • Trigger - Turn on Elemental Destruction Knockback <gen>
                • Else - Actions
              • -------- MOVE TOTEMS --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ED_GroupTotem[ED_CV_Caster] is empty) Equal to False
                • Then - Actions
                  • Set VariableSet ED_Count = (Number of units in ED_GroupTotem[ED_CV_Caster])
                  • Set VariableSet ED_Angle[1] = (360.00 / (Real(ED_Count)))
                  • Unit Group - Pick every unit in ED_GroupTotem[ED_CV_Caster] and do (Actions)
                    • Loop - Actions
                      • Set VariableSet ED_Target = (Picked unit)
                      • Unit - Kill ED_Target
                  • For each (Integer ED_Integer) from 1 to ED_Count, do (Actions)
                    • Loop - Actions
                      • Set VariableSet ED_Angle[2] = (ED_Angle[2] + ED_Angle[1])
                      • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of ED_Caster[ED_CV_Caster]) at (ED_Point[ED_CV_Caster] offset by 500.00 towards ED_Angle[2] degrees.) facing ED_Point[ED_CV_Caster]
                      • Set VariableSet ED_Dummy = (Last created unit)
                      • Unit - Add Primordial Storm Totem to ED_Dummy
                      • Unit - Set level of Primordial Storm Totem for ED_Dummy to (Level of Primordial Storm Totem for ED_Caster[ED_CV_Caster])
                      • Unit - Order ED_Dummy to Neutral Beastmaster - Summon Quilbeast.
                      • Unit - Add a 0.50 second Generic expiration timer to ED_Dummy
                • Else - Actions
              • -------- CLEAN UP --------
              • Set VariableSet ED_Angle[2] = 0.00
              • Custom script: call DestroyGroup(udg_ED_GroupTotem[udg_ED_CV_Caster])
              • Custom script: call RemoveLocation (udg_ED_Point[udg_ED_CV_Caster])
              • -------- FINISHING --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in ED_GroupFlying) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Last edited:
Level 12
Joined
May 16, 2020
Messages
660
This is bullshit. I narrowed it down to something completely unrelated.

If this random unit is present in the map, the dummy unit does cast the ability.
qpUDTlv.png


However, if I delete this completely random unit (and do literally no other change whatsoever), the dummy unit does NOT cast earthquake. Wtf?

I attached my map, since I have no explanation for this at all.

***

Edit: And when I add another peasant to the map (this invisible unit is a peasant with a special effect model), then it works again... and it only happens with Earthquake from what I can tell (just now tested Blizzard and this works fine)

Edit2: Can also confirm that it only happens in the attached map. In newly created maps Earthquake works cast just fine.

Edit3: When removing this unit from the map (yes, I deleted and tested 1 by 1), then it also works

PUiOEHG.png
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Likely caused by the presence of the Diabolic Edict custom ability. This channel based ability is set to corrupt the earthquake order string by turning it into an Instant (No Target) ability instead of what it usually is.

Channel abilities must use a Target Type that is appropriate for the Base Order ID. If the Target Type is not appropriate then the original spell that uses the Base Order ID will no longer be able to be cast by triggers once the incorrectly configured channel based ability gets loaded.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Wow man, how did you find this out so quickly?
Because this is a common issue. Upon reading your post I was already fairly sure this was the cause. A quick search in the object editor showed it was the case.
So is this OK?:
Looks ok to me. You can always verify by giving a dummy an ability that uses battleroar and order it to cast it via triggers.
 
Status
Not open for further replies.
Top