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

Best way to refference this unit?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
I create a unit in 1 trigger and need to reference the owner of that created unit in another trigger, keep in mind this unit has a timed life spam.
And this will need to work for multiple players at once so MPI not necessary to be MUI i guess though, but wouldn't hurt.

  • Trigger - Add to Damage Trigger <gen> the event (Unit - A unit comes within 200.00 of (Last created unit))
 
Level 5
Joined
Nov 30, 2012
Messages
200
You can use a variable with the Add New Event action. I might not be understanding your question, though.
 
Level 13
Joined
Mar 24, 2010
Messages
950
  • Damage Trigger
    • Events
    • Conditions
      • ((Triggering unit) is A structure) Equal to False
      • ((Triggering unit) is Magic Immune) Equal to False
      • ((Triggering unit) is An Ancient) Equal to False
      • ((Triggering unit) is Magic Immune) Equal to False
    • Actions
      • Unit - Cause (the unit?) to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Normal
when any unit comes within that 200 range of the unit added to this trigger that triggering unit should be damaged from the owner of that unit from the event even when i was going to do a unit comparison with a variable i dont really have a way to tell what player owns the unit though.
 
Level 13
Joined
Mar 24, 2010
Messages
950
that would probably be more work than its worth :/ this unit is always moving so i would have to constantly update the area location of this made region. easier to have it be units that get within range of this moving unit. just sucks there is no easy way to reference this unit they are getting within range of, you would think blizzard woulda made something for this situation...
 
Level 5
Joined
Nov 30, 2012
Messages
200
To tell if there is at least one unit in range of another, create a unit group that includes all the units in a range of X of point A and count to see if it is greater than 0.
 
just sucks there is no easy way to reference this unit they are getting within range of, you would think blizzard woulda made something for this situation...
Hm.. Yes it does suck.

To tell if there is at least one unit in range of another, create a unit group that includes all the units in a range of X of point A and count to see if it is greater than 0.

He wants to reference the unit being approached by the unit coming in range, not count the number of people here and there. Group Enumerations are inaccurate even if you find out who's nearest or farthest, that person is still not the unit whom you approached.
 
Status
Not open for further replies.
Top