• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[General] Removing Invisibility by trigger

Status
Not open for further replies.
Level 22
Joined
Nov 20, 2005
Messages
1,232
Units attacked by invisibility do not respond to attacks, so i want to remove invisibility from enemy attacked units(by trigger) so that they can attack back. How to do it? I've been trying to "remove buff from attacked unit" but it didn't work. Also i've looked for a similar thread around for answers, but none corresponds to the way i explained i want it.
 

Uncle

Warcraft Moderator
Level 71
Joined
Aug 10, 2018
Messages
7,518
You want to remove the invisibility buff when you attack an invisible enemy?

So if I have detection, and I attack a Windwalked Blademaster, he should lose his Windwalk buff?

There's different forms of Invisibility and different buffs but I imagine this would work for Windwalk:
  • Events
  • Unit - A unit is attacked
  • Conditions
  • (Attacked unit) has buff Windwalk Equal to True
  • Actions
  • Unit - Remove Windwalk buff from (Attacked unit)

If you're still having issues, post your triggers and state the exact ability that you're using for invisibility.
 
Level 22
Joined
Nov 20, 2005
Messages
1,232
You want to remove the invisibility buff when you attack an invisible enemy?

So if I have detection, and I attack a Windwalked Blademaster, he should lose his Windwalk buff?
Precisely. Thank you for the reply and the trigger. In my case it's the Binv buff. I will test it shortly and update.

EDIT: ok so i had thought about the same trigger, but nope, the buff won't go. The script line is just another of the attempts i tried. Please ignore that. Any other ideas?

image_2021-12-21_013811-png.392028
 
Last edited:
Level 20
Joined
Feb 23, 2014
Messages
1,265
I just tested it and the buff is removed normally:

  • Events
    • Unit - A unit Is attacked
  • Conditions
    • ((Attacked unit) has buff Invisibility) Equal to True
  • Actions
    • Unit - Remove Invisibility buff from (Attacked unit)

Looking at your trigger, it appears to be disabled / have disabled functions - if that's how you have it in your map, fix the actions, re-enable the trigger and try again (simply double click each action, if there's any reference missing - fill it, click OK and then check the Enabled box).

Also, your last condition is wrong. If you want to check if the target is a ground unit, you should use the Boolean Comparison -> Unit - Unit Classification Check instead of Unit - Unit-Type Classification Check. I'm not sure what the latter is for, but I tested it and in this context it doesn't work.

Anyway, your last condition should look like this:

  • Conditions
    • ((Attacked unit) is A ground unit) Equal to True

Assuming everything is okay with player conditions, i.e. the target is owned by one of the players you specified, it should work.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,264
I am a bit confused as to the question. Invisibility, shadow meld and windwalk are already automatically lost on attack. The invisibility used by the drenari should also automatically reveal themselves after every attack. Only the invisibility used by the Shade should allow attacks without revealing the attacker.
 
Level 22
Joined
Nov 20, 2005
Messages
1,232
Anyway, your last condition should look like this:

  • cond.gif
    Conditions
    • joinbottom.gif
      if.gif
      ((Attacked unit) is A ground unit) Equal to True

Assuming everything is okay with player conditions, i.e. the target is owned by one of the players you specified, it should work.
You're right. That condition does actually look a bit dodgy, tbh.
I shall update shortly.

I am a bit confused as to the question. Invisibility, shadow meld and windwalk are already automatically lost on attack. The invisibility used by the drenari should also automatically reveal themselves after every attack. Only the invisibility used by the Shade should allow attacks without revealing the attacker.
Units which were being cast Sorceress "Invisibility" onto. They patrol into my base to attack me, but they don't respond when i attack them after detecting them. They either slip through towards their designed patrol points or die before their buff wears off.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,264
Units which were being cast Sorceress "Invisibility" onto. They patrol into my base to attack me, but they don't respond when i attack them after detecting them. They either slip through towards their designed patrol points or die before their buff wears off.
Ah that is because such invisible units do not acquire targets to prevent them revealing themselves against the player's wishes by auto attacking anything that goes into range.

The buff removal approach in response to them being attacked by an enemy does sound like the way to go.
 
Status
Not open for further replies.
Top