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

[General] Bug with "Takes Damage" - Event

Status
Not open for further replies.
Level 15
Joined
Sep 11, 2013
Messages
557
Greetings!
I found a weird problem with my test map.
I tried to make a unit which deal 0 damage to a particular building(tower) and then the tower must use a special effect(heal)
The problem is: this "Takes Damage" - Event will activate the special effect of the trigger even when i don't attack anything. I just move my skeleton around towers and my trigger just activate random. I found that this bug appear only when my tower is a building, but i don't want it to be a unit.

Can someone solve this bug with the tower as a building?

The help will be appreciated!
 

Attachments

You're using the wrong Event Response. (Attacked unit) and (Attacking unit) are used with the Event:
  • Unit - A unit is attacked
Damage Events use the (Damage Source) and (Damage Target) Event Responses.

Also, you're using some odd math to Set the Damage, here's a fixed up trigger:
  • Damage
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage Target)) Equal to Scout Tower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to Skeleton Archer
        • Then - Actions
          • Event Response - Set Damage of Unit Damaged Event to 0.00
          • Special Effect - Create a special effect attached to the overhead of (Damage Target) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Event Response - Set Damage of Unit Damaged Event to 1.00
Archers will deal 0 damage to the tower while every other unit will deal 1 damage.

But that aside, I did notice the bug, which is REALLY weird. However, the problem should go away if you create a new map.

I think your current map is haunted :p
 
Last edited:
Hi! Thank you for telling me how to make this trigger properly! The trigger works great and indeed the bug has disappeared after i put this trigger in a new map, but then i started to test again to find out what couse the problem in the first place and i found something really strange.

If you go in Scenario - player properties - and add for example one computer on player blue and that user has few blue towers on the map, the problem appear.
If i put NONE on player 2, the problem dissaper again

It work even in a new map
 
Last edited:
Status
Not open for further replies.
Back
Top