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

[Trigger] Removing Dummy unit when it comes close to target

Status
Not open for further replies.
Level 2
Joined
Jul 17, 2009
Messages
5
Hello!
I am writing because I have a problem with trigger, like a total noob, again. Well, I've made an "Ulti" for one of heroes in my map which is called Angel of Flames. It summons dummy unit which charges to target, dealing damage every foe in range(when Angel is charging). And I have problem again, which is probably easy as hell to solve but I'm too big noob to see the most obvious way out. I just... Can't remove Angel unit. You know, I've prepared whole code, and I have problem with that:

  • If (All conditions are True) then do (Then actions) else do (Else actions)
I mean, I don't have an idea how to make condition for that, Angel is close to target. I've tried with region convert to point(position of targeted unit) but it doesn't work.
Thanks.
 
Level 2
Joined
May 3, 2008
Messages
18
I'm sure i understand the problem exactly, but this might do:
  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • (Distance between (Position of dummy) and (Position of target)) Less than 10.00
    • Actions
      • Unit - Remove dummy from the game
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
position of something always leak, store it to a point variable then remove it...

  • Set loc1 = position of dummy
  • Set loc2 = position of target
  • if (Distance between loc1 and loc2 Less than 10.00) then
  • Unit - Remove dummy from the game
  • endif
  • Custom script: call RemoveLocation(udg_loc1)
  • Custom script: call RemoveLocation(udg_loc2)
 
Status
Not open for further replies.
Top