• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need assistance for a "mark ability"

Status
Not open for further replies.
Level 12
Joined
Oct 28, 2019
Messages
481
I will try to explain as simply as possible. A skill that marks the enemy target with a special effect on the head (this has already been done and is done).

The problem is this... When the skill used marks the enemy (this is a creep, not another player), he retaliates and comes to attack the player.
What skill can I try? I've tried Storm bolt, Acid bomb, curse, holy light any one makes the enemy retaliate. The enemy must only retaliate when attacked, not when they receive the "mark"

1660005282600.png
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
One method you can use is to catch when the Hero begins to cast Mark and then fake the casting effect:
  • Mark
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Mark
    • Actions
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - 50.00)
      • Unit - For Unit (Triggering unit), start cooldown of ability (Ability being cast) " over "5.00 seconds.
So the ability never actually starts it's effects but it still spends mana and goes on cooldown. I've tested this and the enemy will not retaliate.

Then you have two choices:
  • Order a Dummy unit to cast Mark on the target. Make sure you add a Condition to this trigger to prevent it from running when the Dummy is the caster.
  • Trigger the effects of Mark yourself. A Unit Indexer makes this relatively easy.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,069
I checked a variety of mundane buff abilities as well as Channel and yes all of them will draw unit aggro. There is one spell I found that does not aggro the unit it's cast on: Sleep. You can remove the buff immediately upon casting or give it 0.01 duration.

There's a problem, though: hitting a unit with Sleep will still aggro any other units in range of that target, even though the target does not aggro (initially). I don't think there are any unit-targeted spells that don't cause nearby units to aggro (there are other target-types of spells that do this, though). You'll have to do what Uncle suggested and not actually let the unit cast the mark spell (just fake it). You can still apply a debuff to the targeted unit with a self-targeting aura you give to that unit.
 
Level 39
Joined
Feb 27, 2007
Messages
5,069
is possible hide an ability? But it can be casted by triggers by the hero?
No. You could un-hide it and cast it and rehide it but only if the hero can cast instananeously, otherwise the ability will be visible on the command card as it's being cast.

Using a dummy unit is a lazy solution. Abort the cast like Uncle showed. You can even make a dummy unit cast any spell on the targeted unit as long as the dummy is owned by the same player as the target unit.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
No. You could un-hide it and cast it and rehide it but only if the hero can cast instananeously, otherwise the ability will be visible on the command card as it's being cast.

Using a dummy unit is a lazy solution. Abort the cast like Uncle showed. You can even make a dummy unit cast any spell on the targeted unit as long as the dummy is owned by the same player as the target unit.
You can hide an ability and still cast it via triggers/hotkey IF it's hidden using the Art - Button Position method -> X: 0, Y: -11.
At least if memory serves right...

@Herod
Not too sure what you mean but I recommend my method, it really works nicely.
 
Last edited:
  • Life Exchange
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Exchange
    • Actions
      • Set CasterU = (Casting unit)
      • Set Caster = (Owner of (Casting unit))
      • Set TargetU = (Target unit of ability being cast)
      • Set Target = (Owner of (Target unit of ability being cast))
      • Unit - Change ownership of TargetU to Neutral Passive and Change color
      • Unit - Grant shared vision of TargetU to Caster
      • Wait 1.00 seconds
      • Unit - Change ownership of TargetU to Target and Change color
      • Wait 15.00 seconds
      • Unit - Deny shared vision of TargetU to Caster
this can work too
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
  • Life Exchange
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Life Exchange
    • Actions
      • Set CasterU = (Casting unit)
      • Set Caster = (Owner of (Casting unit))
      • Set TargetU = (Target unit of ability being cast)
      • Set Target = (Owner of (Target unit of ability being cast))
      • Unit - Change ownership of TargetU to Neutral Passive and Change color
      • Unit - Grant shared vision of TargetU to Caster
      • Wait 1.00 seconds
      • Unit - Change ownership of TargetU to Target and Change color
      • Wait 15.00 seconds
      • Unit - Deny shared vision of TargetU to Caster
this can work too
I'd be careful with this method, it's not MUI safe. Also, using the Begins casting Event like that is not a good idea, it can be cancelled.
 
I'd be careful with this method, it's not MUI safe. Also, using the Begins casting Event like that is not a good idea, it can be cancelled.
I think this better
  • Life Exchange
    • Events
      • Unit - A unit Start casting an ability
    • Conditions
      • (Ability being cast) Equal to Acid bomb
    • Actions
      • Set CasterU = (Casting unit)
      • Set Caster = (Owner of (Casting unit))
      • Set TargetU = (Target unit of ability being cast)
      • Set Target = (Owner of (Target unit of ability being cast))
      • Unit - Change ownership of TargetU to Neutral Passive and Change color
      • Wait 1.00 seconds
      • Unit - Change ownership of TargetU to Target and Change color
 
Level 12
Joined
Oct 28, 2019
Messages
481
The last question... I dont know if this is possible via GUI.

A Lightning Warrior, hits the target, 1 2 3, when the 4 strike happens it will cast a lighting chain. Its all ok, but has 2 issues... First the "number 1" appears before the warrior hits the target. Theres a damage event trigger already dont if possible use again. Second: when the chain lightning is casted, must have a cooldown, that im not getting introducing

  • ELightningAttack
    • Events
      • Unit - A unit owned by Player 2 (Blue) Starts the effect of an ability
    • Conditions
      • (Triggering unit) Equal to HeroVariable
      • (Ability being cast) Equal to Lightning Strike (E)
      • BoleanTarget Equal to True
    • Actions
      • Unit - Order HeroVariable to Human Mountain King - Storm Bolt UnitTarget
      • Set VariableSet NstrikesLightning = (NstrikesLightning + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NstrikesLightning Equal to 1
        • Then - Actions
          • Game - Display to Player Group - Player 2 (Blue) the text: Number of Strikes: 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NstrikesLightning Equal to 2
        • Then - Actions
          • Game - Display to Player Group - Player 2 (Blue) the text: Number of Strikes: 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NstrikesLightning Equal to 3
        • Then - Actions
          • Game - Display to Player Group - Player 2 (Blue) the text: Number of Strikes: 3
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NstrikesLightning Equal to 4
        • Then - Actions
          • Unit - Order HeroVariable to Orc Far Seer - Chain Lightning UnitTarget
          • Set VariableSet NstrikesLightning = 0
        • Else - Actions
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
I think this better
  • Life Exchange
    • Events
      • Unit - A unit Start casting an ability
    • Conditions
      • (Ability being cast) Equal to Acid bomb
    • Actions
      • Set CasterU = (Casting unit)
      • Set Caster = (Owner of (Casting unit))
      • Set TargetU = (Target unit of ability being cast)
      • Set Target = (Owner of (Target unit of ability being cast))
      • Unit - Change ownership of TargetU to Neutral Passive and Change color
      • Wait 1.00 seconds
      • Unit - Change ownership of TargetU to Target and Change color
The problem is that you're referencing variables after the 1.00 second Wait. These variables can be changed at any time during the Wait because they're global variables. If they were local variables then you wouldn't have this issue.

However, this method can be fine if you meet these requirements:
1) You use these variables only in this trigger.
2) Only one unit has this ability.
3) The cooldown of the ability is always longer than the Wait.

If you don't meet these requirements then the trigger is not safe and will be prone to bugs.

That aside, changing the ownership of your target will create way more problems than solve so I can't recommend doing this even if you fixed the listed issues.

@Herod
I don't fully understand what you want but you can use as many Damage Event triggers as you'd like. Keep in mind that your current trigger will only work if there's a SINGLE hero on the map with this ability. Otherwise, you're running into MUI issues again. Also, the Hero can cancel the order to cast Chain Lightning/Storm Bolt. Why not have a Dummy unit cast these so it's guaranteed to work. Also, where are you setting UnitTarget?
 
Last edited:
Level 23
Joined
Oct 18, 2008
Messages
938
you can give ownership of the target to neutral, then immediately give it back afterwards. this should avoid aggro from both it and others near it.

another method is to give the ethereal ability from spirit walkers to the casting unit, since most units can't attack ethereal units they will lose aggro towards that unit. you can then immediately remove the ability again.

No. You could un-hide it and cast it and rehide it but only if the hero can cast instananeously, otherwise the ability will be visible on the command card as it's being cast.
no it won't. you can enable the ability when telling the unit to cast, then immediately disable it without interrupting the spell.
 
The problem is that you're referencing variables after the 1.00 second Wait. These variables can be changed at any time during the Wait because they're global variables. If they were local variables then you wouldn't have this issue.

However, this method can be fine if you meet these requirements:
1) You use these variables only in this trigger.
2) Only one unit has this ability.
3) The cooldown of the ability is always longer than the Wait.

If you don't meet these requirements then the trigger is not safe and will be prone to bugs.

That aside, changing the ownership of your target will create way more problems than solve so I can't recommend doing this even if you fixed the listed issues.

@Herod
I don't fully understand what you want but you can use as many Damage Event triggers as you'd like. Keep in mind that your current trigger will only work if there's a SINGLE hero on the map with this ability. Otherwise, you're running into MUI issues again. Also, the Hero can cancel the order to cast Chain Lightning/Storm Bolt. Why not have a Dummy unit cast these so it's guaranteed to work. Also, where are you setting UnitTarget?
Thx Uncle for your explanation why i should not use wait
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
I'm still slightly confused. Chain Lightning is hidden, right? So you'll need to unhide the ability in order to see the cooldown.

Unless you mean you want the cooldown to show up on the Forked Lightning ability icon. If not then I'm a little confused as to how you want the cooldown to display.


Anyway, you can make any ability go on cooldown using this:
  • Unit - For Unit (Triggering unit), start cooldown of ability Forked Lightning" over "10.00 seconds.
You can show/hide abilities like this:
  • Unit - For (Triggering unit), Ability Forked Lightning, Hide ability: True
  • Unit - For (Triggering unit), Ability Forked Lightning, Hide ability: False
 
Level 39
Joined
Feb 27, 2007
Messages
5,069
You can just manually start the cooldown of any for whatever duration you want. You can just put the ability you are using to trigger the attacks on cooldown. Or you can put a hidden ability on cooldown and check its current cooldown remaining. There are now actions to do this:
  • Unit - For Unit (Triggering Unit), start cooldown of ability ABILITY " over "3.00 seconds.
 
Level 12
Joined
Oct 28, 2019
Messages
481
I'm still slightly confused. Chain Lightning is hidden, right? So you'll need to unhide the ability in order to see the cooldown.

Unless you mean you want the cooldown to show up on the Forked Lightning ability icon. If not then I'm a little confused as to how you want the cooldown to display.


Anyway, you can make any ability go on cooldown using this:
  • Unit - For Unit (Triggering unit), start cooldown of ability Forked Lightning" over "10.00 seconds.
I swear that ive tested this, but worked ty...
 
Status
Not open for further replies.
Top