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

Need an event srcipt

Status
Not open for further replies.
Level 2
Joined
Apr 6, 2009
Messages
10
Is i possible to covert the
event
Unit - (some picked unit) Takes damage
to any unit Takes damage ?

Im trying to make a cool sheild effect when a unit is hit but right now there is only the generic event
Unit is attacked and then the trigger wont work correctly since the effect fires befor the attack hits. And aoe attack dont even count.

(edit)

If I do this every 2 seconds it works like a charm ^^

Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Trigger - Add to Sheild <gen> the event (Unit - (Picked unit) Takes damage)
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
I don't think it's possible to have such an event.

  • Add Existing Units
    • Events
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to Show Damage <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • Add Trained Units
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Show Damage <gen> the event (Unit - (Triggering unit) Takes damage)
The first trigger adds all units already in the map into the damage detection trigger. The latter adds a units that are trained/spawned whatever during the game.
 
Status
Not open for further replies.
Top