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

Add event to trigger.

Status
Not open for further replies.
Level 9
Joined
Sep 28, 2004
Messages
365
  • TestShield
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ShieldWall
    • Actions
      • Trigger - Add to Takes Damage Test <gen> the event (Unit - (Triggering unit) Takes damage)
Assuming if i am the player. I cast this twice.

1. Will it add to the Takes Damage Test trigger again? Or it won't because is the same triggering unit?

2. If it has been added twice, assuming my Takes Damage Test trigger sets the health of triggering unit to damage taken. Will it set the health of unit twice? Or it won't be affected.

3. How do i remove the event from a trigger? Or if so, how do i ensure if the shield is down, the trigger won't work for the caster anymore?
 
Level 14
Joined
Aug 31, 2009
Messages
775
1. It will add it again, causing your triggers to run twice.
2. Twice.
3. Add the unit event not when the spell is cast, but at game initialisation or when the unit enters the game. Then when you cast the spell, apply a buff to the caster and then check for if the unit has that buff to consider what to do in the trigger.
 
Status
Not open for further replies.
Top