• 🏆 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!

[Trigger] Need help with a duel spell, some questions about MUI and leaks too. (SOLVED)

Status
Not open for further replies.
Level 2
Joined
May 29, 2021
Messages
8
Hello everyone.

I am creating the ultimate spell for one of my heroes, it is a duel spell.
In concrete terms, the caster deIfgnates another hero, the two heroes are teleported to a zone and have 12 seconds to kill each other. Both heroes are Iflenced for the first 8 seconds because the hero with the duel spell is mostly based on auto-attacks.
At the end of the 12 seconds the victorious hero is teleported back to where he was before he was teleported into the arena and is healed of all his life.
However, if both heroes are still alive at the end of the 12 seconds, they are both teleported to the poIftion before the teleportation into the arena and the target of the duel is healed of 50% of his life normally.

Here is the first trigger I made:

  • Duel cast
    • Evénements
      • Unité - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal à Duel
      • ((Target unit of ability being cast) is Un héros) Egal à TRUE
    • Actions
      • Set Duel_caster = (Triggering unit)
      • Set Duel_caster_loc_start = (Position of Duel_caster)
      • Set Duel_target = (Target unit of ability being cast)
      • Set Duel_target_loc_start = (Position of Duel_target)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Duel_target is Un héros) Egal à TRUE
        • Alors - Actions
          • Unité - Make Duel_caster Invulnérable
          • Unité - Make Duel_target Invulnérable
          • Unité - Remove Tous buffs considered Magique ou physique from Duel_caster (Inclure expiration timers, Exclure auras)
          • Unité - Remove Tous buffs considered Magique ou physique from Duel_target (Inclure expiration timers, Exclure auras)
          • Effet spécial - Create a special effect attached to the overhead of Duel_caster using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Effet spécial - Create a special effect attached to the overhead of Duel_target using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Wait 1.00 seconds
          • Unité - Move Duel_caster instantly to (Center of Duel caster arrival <gen>), facing (Center of Duel target arrival <gen>)
          • Caméra - Pan camera for (Owner of Duel_caster) to (Center of Duel caster arrival <gen>) over 0.00 seconds
          • Unité - Move Duel_target instantly to (Center of Duel target arrival <gen>), facing (Center of Duel caster arrival <gen>)
          • Caméra - Pan camera for (Owner of Duel_target) to (Center of Duel target arrival <gen>) over 0.00 seconds
          • Effet spécial - Destroy (Last created special effect)
          • Set Duel_groupe = (Units in Arene Duel <gen> matching (((Matching unit) Egal à Duel_caster) and ((Matching unit) Egal à Duel_target)))
          • Wait 3.00 seconds
          • Unité - Make Duel_caster Vulnérable
          • Unité - Make Duel_target Vulnérable
          • Unité - Create 1 Dummy temp0 for Neutre Passif at (Center of Texte Duel <gen>) facing Orientation bâtiment par défaut degrees
          • Set Duel_silence_dummy = (Last created unit)
          • Unité - Add a 1.00 second Générique expiration timer to Duel_silence_dummy
          • Unité - Add Silence Duel dummy to Duel_silence_dummy
          • Unité - Order Duel_silence_dummy to Ranger sombre neutre - Silence (Center of Texte Duel <gen>)
          • Wait 12.00 game-time seconds
          • Groupe unité - Pick every unit in (Units in Arene Duel <gen>) and do (Actions)
            • Boucle - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • (Duel_caster is alive) Egal à TRUE
                • Alors - Actions
                  • Unité - Set life of Duel_caster to 100.00%
                  • Unité - Move Duel_caster instantly to Duel_caster_loc_start
                  • Caméra - Pan camera for (Owner of Duel_caster) to Duel_caster_loc_start over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_Duel_caster_loc_start)
                • Sinon - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • (Duel_target is alive) Egal à TRUE
                • Alors - Actions
                  • Unité - Set life of Duel_target to 100.00%
                  • Unité - Move Duel_target instantly to Duel_target_loc_start
                  • Caméra - Pan camera for (Owner of Duel_target) to Duel_target_loc_start over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_Duel_target_loc_start)
                • Sinon - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • ((Duel_caster is alive) Egal à TRUE) and ((Duel_target is alive) Egal à TRUE)
                • Alors - Actions
                  • Unité - Move Duel_caster instantly to Duel_caster_loc_start
                  • Caméra - Pan camera for (Owner of Duel_caster) to Duel_caster_loc_start over 0.00 seconds
                  • Unité - Move Duel_target instantly to Duel_target_loc_start
                  • If ((Percentage life of Duel_target) Inférieur à 50.00) then do (Unité - Set life of Duel_target to 50.00%) else do (Do nothing)
                  • Caméra - Pan camera for (Owner of Duel_target) to Duel_target_loc_start over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_Duel_caster_loc_start)
                  • Custom script: call RemoveLocation(udg_Duel_target_loc_start)
                • Sinon - Actions
        • Sinon - Actions
__________________________________________________________________________________________________________________________________________________________________________________________________________

Duel cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Duel
((Target unit of ability being cast) is A hero) Equal to TRUE
Actions
Set Duel_caster = (Triggering unit)
Set Duel_caster_loc_start = (PoIftion of Duel_caster)
Set Duel_target = (Target unit of ability being cast)
Set Duel_target_loc_start = (PoIftion of Duel_target)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Duel_target is A hero) Equal to TRUE
Then - Actions
Unit - Make Duel_caster Invulnerable
Unit - Make Duel_target Invulnerable
Unit - Remove All buffs conIfdered Magic or phyIfcs from Duel_caster (Inclure expiration timers, Exclure auras)
Unit - Remove All buffs conIfdered Magic ou phyIfcs from Duel_target (Inclure expiration timers, Exclure auras)
Special effect - Create a special effect attached to the overhead of Duel_caster uIfng Abilities\Spells\Human\Avatar\AvatarCaster.mdl
Special effect - Create a special effect attached to the overhead of Duel_target uIfng Abilities\Spells\Human\Avatar\AvatarCaster.mdl
Wait 1.00 seconds
Unit - Move Duel_caster instantly to (Center of Duel caster arrival <gen>), facing (Center of Duel target arrival <gen>)
Camera - Pan camera for (Owner of Duel_caster) to (Center of Duel caster arrival <gen>) over 0.00 seconds
Unit - Move Duel_target instantly to (Center of Duel target arrival <gen>), facing (Center of Duel caster arrival <gen>)
Camera - Pan camera for (Owner of Duel_target) to (Center of Duel target arrival <gen>) over 0.00 seconds
Special - Destroy (Last created special effect)
Wait 3.00 seconds
Unit - Make Duel_caster Vulnerable
Unit - Make Duel_target Vulnerable
Unit - Create 1 Dummy temp0 for Neutre PasIff at (Center of Texte Duel <gen>) facing Orientation batiment par defaut degrees
Set Duel_Iflence_dummy = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to Duel_Iflence_dummy
Unit - Add Iflence Duel dummy to Duel_Iflence_dummy
Unit - Order Duel_Iflence_dummy to Ranger sombre neutre - Iflence (Center of Texte Duel <gen>)
Wait 12.00 game-time seconds
Groupe unit - Pick every unit in (Units in Arene Duel <gen>) and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Duel_caster is alive) Egal to TRUE
Then - Actions
Unit - Set life of Duel_caster to 100.00%
Unit - Move Duel_caster instantly to Duel_caster_loc_start
Camera - Pan camera for (Owner of Duel_caster) to Duel_caster_loc_start over 0.00 seconds
Custom script: call RemoveLocation(udg_Duel_caster_loc_start)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Duel_target is alive) Egal to TRUE
Then - Actions
Unit - Set life of Duel_target to 100.00%
Unit - Move Duel_target instantly to Duel_target_loc_start
Camra - Pan camera for (Owner of Duel_target) to Duel_target_loc_start over 0.00 seconds
Custom script: call RemoveLocation(udg_Duel_target_loc_start)
If - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Duel_caster is alive) Egal to TRUE) and ((Duel_target is alive) Egal to TRUE)
Then - Actions
Unit - Move Duel_caster instantly to Duel_caster_loc_start
Camera - Pan camera for (Owner of Duel_caster) to Duel_caster_loc_start over 0.00 seconds
Unit - Move Duel_target instantly to Duel_target_loc_start
If ((Percentage life of Duel_target) Infrieur to 50.00) then do (Unit - Set life of Duel_target to 50.00%) else do (Do nothing)
Camra - Pan camera for (Owner of Duel_target) to Duel_target_loc_start over 0.00 seconds
Custom script: call RemoveLocation(udg_Duel_caster_loc_start)
Custom script: call RemoveLocation(udg_Duel_target_loc_start)
If - Actions
If – Actions
__________________________________________________________________________________________________________________________________________________________________________________________________________

Various problems related to this trigger:

  • If both units are alive at the end of the 12 seconds they are both set to 100% hit points instead of a 50% hit point gain for the duel target.
  • I haven't figured out how to heal a unit to 50% of its max hp.
  • I used "wait", I know it's not right but I have absolutely no idea how to do it without. Especially since on my map it will be impossible for two players to be the same hero, is it really necessary to use an alternative to "wait"?

These are the triggers I tried to do without "wait":

  • Config wait duel launch
    • Evénements
      • Unité - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal à Duel
    • Actions
      • Set Duel_launch_max_index = (Duel_launch_max_index + 1)
      • Set Duel_casterII[Duel_launch_max_index] = (Triggering unit)
      • Set Duel_caster_loc_startII[Duel_launch_max_index] = (Position of Duel_casterII[Duel_launch_max_index])
      • Set Duel_targetII[Duel_launch_max_index] = (Target unit of ability being cast)
      • Set Duel_target_loc_startII[Duel_launch_max_index] = (Position of Duel_targetII[Duel_launch_max_index])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • Duel_launch_max_index Egal à 2
        • Alors - Actions
          • Déclencheur - Turn on Duel test without wait <gen>
        • Sinon - Actions
__________________________________________________________________________________________________________________________________________________________________________________________________________

Config wait duel launch
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Egal to Duel
Actions
Set Duel_launch_max_index = (Duel_launch_max_index + 1)
Set Duel_casterII[Duel_launch_max_index] = (Triggering unit)
Set Duel_caster_loc_startII[Duel_launch_max_index] = (Position of Duel_casterII[Duel_launch_max_index])
Set Duel_targetII[Duel_launch_max_index] = (Target unit of ability being cast)
Set Duel_target_loc_startII[Duel_launch_max_index] = (Position of Duel_targetII[Duel_launch_max_index])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Duel_launch_max_index Equal to 2
Alors - Actions
Trigger - Turn on Duel test without wait <gen>
Then – Actions


  • Duel test without wait
    • Evénements
      • Temps - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unité - Make Duel_casterII[Duel_launch_current_index] Invulnérable
      • Unité - Make Duel_targetII[Duel_launch_current_index] Invulnérable
      • Unité - Remove Tous buffs considered Magique ou physique from Duel_casterII[Duel_launch_current_index] (Inclure expiration timers, Exclure auras)
      • Unité - Remove Tous buffs considered Magique ou physique from Duel_targetII[Duel_launch_current_index] (Inclure expiration timers, Exclure auras)
      • Effet spécial - Create a special effect attached to the overhead of Duel_casterII[Duel_launch_current_index] using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • Effet spécial - Create a special effect attached to the overhead of Duel_targetII[Duel_launch_current_index] using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • For each (Integer Duel_launch_current_index) from 1 to Duel_launch_max_index, do (Actions)
        • Boucle - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • (Duel_targetII[Duel_launch_current_index] is Un héros) Egal à TRUE
            • Alors - Actions
              • Unité - Move Duel_casterII[Duel_launch_current_index] instantly to (Center of Duel caster arrival <gen>), facing (Center of Duel target arrival <gen>)
              • Caméra - Pan camera for (Owner of Duel_casterII[Duel_launch_current_index]) to (Center of Duel caster arrival <gen>) over 0.00 seconds
              • Unité - Move Duel_targetII[Duel_launch_current_index] instantly to (Center of Duel target arrival <gen>), facing (Center of Duel caster arrival <gen>)
              • Caméra - Pan camera for (Owner of Duel_targetII[Duel_launch_current_index]) to (Center of Duel target arrival <gen>) over 0.00 seconds
              • Effet spécial - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_Duel_caster_loc_start[udg_Duel_launch_current_index])
              • Custom script: call RemoveLocation(udg_Duel_target_loc_start[udg_Duel_launch_current_index])
              • Set Duel_caster_loc_startII[Duel_launch_current_index] = (Position of Duel_casterII[Duel_launch_max_index])
              • Set Duel_casterII[Duel_launch_current_index] = Duel_casterII[Duel_launch_max_index]
              • Set Duel_target_loc_startII[Duel_launch_current_index] = Duel_target_loc_startII[Duel_launch_max_index]
              • Set Duel_targetII[Duel_launch_current_index] = Duel_targetII[Duel_launch_max_index]
              • Set Duel_launch_max_index = (Duel_launch_max_index - 1)
              • Set Duel_launch_current_index = (Duel_launch_current_index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • Duel_launch_max_index Egal à 0
                • Alors - Actions
                  • Déclencheur - Turn off (This trigger)
                • Sinon - Actions
            • Sinon - Actions
___________________________________________________________________________________________


Duel test without wait
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit - Make Duel_casterII[Duel_launch_current_index] Invulnerable
Unit - Make Duel_targetII[Duel_launch_current_index] Invulnerable
Unit - Remove All buffs considered Magic ou physics from Duel_casterII[Duel_launch_current_index] (Inclure expiration timers, Exclure auras)
Unit - Remove All buffs considered Magic ou physics from Duel_targetII[Duel_launch_current_index] (Inclure expiration timers, Exclure auras)
Special effect - Create a special effect attached to the overhead of Duel_casterII[Duel_launch_current_index] using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
Special effect - Create a special effect attached to the overhead of Duel_targetII[Duel_launch_current_index] using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
For each (Integer Duel_launch_current_index) from 1 to Duel_launch_max_index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
if - Conditions
(Duel_targetII[Duel_launch_current_index] is A hero) Equal to TRUE
Then - Actions
Unit - Move Duel_casterII[Duel_launch_current_index] instantly to (Center of Duel caster arrival <gen>), facing (Center of Duel target arrival <gen>)
Camera - Pan camera for (Owner of Duel_casterII[Duel_launch_current_index]) to (Center of Duel caster arrival <gen>) over 0.00 seconds
Unit - Move Duel_targetII[Duel_launch_current_index] instantly to (Center of Duel target arrival <gen>), facing (Center of Duel caster arrival <gen>)
Camera - Pan camera for (Owner of Duel_targetII[Duel_launch_current_index]) to (Center of Duel target arrival <gen>) over 0.00 seconds
Special effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_Duel_caster_loc_start[udg_Duel_launch_current_index])
Custom script: call RemoveLocation(udg_Duel_target_loc_start[udg_Duel_launch_current_index])
Set Duel_caster_loc_startII[Duel_launch_current_index] = (Position of Duel_casterII[Duel_launch_max_index])
Set Duel_casterII[Duel_launch_current_index] = Duel_casterII[Duel_launch_max_index]
Set Duel_target_loc_startII[Duel_launch_current_index] = Duel_target_loc_startII[Duel_launch_max_index]
Set Duel_targetII[Duel_launch_current_index] = Duel_targetII[Duel_launch_max_index]
Set Duel_launch_max_index = (Duel_launch_max_index - 1)
Set Duel_launch_current_index = (Duel_launch_current_index - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Duel_launch_max_index Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else – Actions

__________________________________________________________________________________________________________________________________________________________________________________________________________

I tried to use this tutorial (MUI Spells Using Artificial Waits), but I didn't understand everything and my trigger is not complete. Also the "wait 1.00 seconds" that I wanted to replace is actually linked to "Time - Every 1.00 seconds of game time" so I don't understand the purpose of the trigger.

I know there are different ways to do a dueling spell. It would have to be what is best for what I want to do.

If you know or have any ideas on how to solve my problem I would be very grateful.

Have a good day!
 
Last edited:
Level 2
Joined
May 29, 2021
Messages
8
It's near impossible to read the triggers like that. How To Post Your Trigger
I know how to post triggers, however I use the French editor and the trigger viewer doesn't like accents and makes the preview very average. I have modified my post by adding the triggers, feel free to tell me if you understand. The first trigger is the most important.

Waits are fine if you know what you're doing.
that's good to hear, but I suppose I could replace some of the "waits" with countdowns, I'd have to look into that.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
  • Cast Duel
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Duel
    • Actions
      • Set Variable Duel_Caster = (Triggering unit)
      • Set Variable Duel_Caster_Loc = (Position of Duel_Caster)
      • Set Variable Duel_Target = (Target unit of ability being cast)
      • Set Variable Duel_Target_Loc = (Position of Duel_Target)
      • -------- --------
      • Unit - Make Duel_Caster Invulnerable
      • Unit - Make Duel_Target Invulnerable
      • Unit - Remove All buffs from Duel_Caster
      • Unit - Remove All buffs from Duel_Target
      • Special Effect - Create a special effect attached to the overhead of Duel_Caster using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the overhead of Duel_Target using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- --------
      • Wait 1.00 seconds
      • Set Variable Duel_Loc = (Center of DuelCasterRegion <gen>)
      • Unit - Move Duel_Caster instantly to Duel_Loc, facing Default building facing degrees
      • Camera - Pan camera for (Owner of Duel_Caster) to Duel_Loc over 0.00 seconds
      • Custom script: call RemoveLocation (udg_Duel_Loc)
      • -------- --------
      • Set Variable Duel_Loc = (Center of DuelTargetRegion <gen>)
      • Unit - Move Duel_Target instantly to Duel_Loc, facing Default building facing degrees
      • Camera - Pan camera for (Owner of Duel_Target) to Duel_Loc over 0.00 seconds
      • Custom script: call RemoveLocation (udg_Duel_Loc)
      • -------- --------
      • Wait 3.00 seconds
      • Unit - Make Duel_Caster Vulnerable
      • Unit - Make Duel_Target Vulnerable
      • Set Variable Duel_Loc = (Center of DuelCenterRegion <gen>)
      • Unit - Create 1 Dummy for Neutral Hostile at Duel_Loc facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Silence (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence Duel_Loc
      • Custom script: call RemoveLocation (udg_Duel_Loc)
      • -------- --------
      • Wait 12.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Duel_Caster is alive) Equal to True
          • (Duel_Target is alive) Equal to False
        • Then - Actions
          • Unit - Set life of Duel_Caster to 100.00%
          • Unit - Move Duel_Caster instantly to Duel_Caster_Loc, facing Default building facing degrees
          • Camera - Pan camera for (Owner of Duel_Caster) to Duel_Caster_Loc over 0.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Duel_Caster is alive) Equal to False
              • (Duel_Target is alive) Equal to True
            • Then - Actions
              • Unit - Set life of Duel_Target to 100.00%
              • Unit - Move Duel_Target instantly to Duel_Target_Loc, facing Default building facing degrees
              • Camera - Pan camera for (Owner of Duel_Target) to Duel_Target_Loc over 0.00 seconds
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Duel_Caster is alive) Equal to True
                  • (Duel_Target is alive) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Percentage life of Duel_Caster) Less than 50.00
                    • Then - Actions
                      • Unit - Set life of Duel_Caster to 50.00%
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Percentage life of Duel_Target) Less than 50.00
                    • Then - Actions
                      • Unit - Set life of Duel_Target to 50.00%
                    • Else - Actions
                  • Unit - Move Duel_Caster instantly to Duel_Caster_Loc, facing Default building facing degrees
                  • Camera - Pan camera for (Owner of Duel_Caster) to Duel_Caster_Loc over 0.00 seconds
                  • Unit - Move Duel_Target instantly to Duel_Target_Loc, facing Default building facing degrees
                  • Camera - Pan camera for (Owner of Duel_Target) to Duel_Target_Loc over 0.00 seconds
                • Else - Actions
      • -------- --------
      • Custom script: call RemoveLocation (udg_Duel_Caster_Loc)
      • Custom script: call RemoveLocation (udg_Duel_Target_Loc)

This should work. I removed all of the memory leaks from your original trigger and fixed anything else that seemed off.

Since only 1 Hero has this ability then you don't need to worry about MUI. One possible issue with this type of trigger is if the Duel ability had a short enough cooldown or could have it's cooldown reset so that it could be cast again during a Duel. I assume it has a longer cooldown so I doubt that's an issue, but if you ever reset cooldowns (think Refresher Orb in DotA) then you'll want to account for this. A simple solution to that would be to disable the ability for the player during the Duel.

Also, you can force the ability to only target Heroes in the Targets Allowed field in the Object Editor. If that doesn't work, you can make another trigger to cancel it:
  • Cancel Duel
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Duel
      • ((Target unit of ability being cast) is A Hero) Equal to False
    • Actions
      • Unit - Order (Triggering unit) to Stop.
 
Last edited:
Level 2
Joined
May 29, 2021
Messages
8
After a few tests everything seems to work perfectly.

Thank you very much again!
 
Status
Not open for further replies.
Top