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

Unit in range of unit

Status
Not open for further replies.
Level 2
Joined
Sep 20, 2010
Messages
13
Hello, I need help with a thing that I have practicly no idea how to do...
I have a spell based on flamestrike tho not doing anything but giving "self" (caster) a buff when entering the burning area. I also create a dummy on targeted position of ability being cast.
What i want to make is a trigger that can start when my unit gain that buff.

----------
I came pretty close to finding the answer 2 times:
1:
Event: Unit within range "500" of "Unit"
My problem here is that I can't define unit to my dummy.

2:
Event: Every "0.01" seconds of game time
Condition: "TriggeringUnit" equal to "............"
"TriggeringUnit" is a variable I made to define my caster.
I want to set the "equal to" to something like "in range 500 of unit"
----------

So hope I was somewhat clear there... Kinda hard to describe in a better way imo. Please help me with some kinda trigger wich can do something like that for me =S And describe how to make the trigger clearly please!

=DD w00t
 
Level 5
Joined
Jan 4, 2007
Messages
103
Heh, maybe this?:

  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Set UnitPoint = (Position of (Triggering Unit))
    • Set FlamestrikeGroup = (Units in (Region centered at UnitPoint with size (500.00, 500.00)) matching (((Matching unit) has buff Your Buff ) Equal to True))
    • Unit Group - Pick every unit in FlamestrikeGroup and do (Actions)
      • Loop - Actions
      • Your Actions
    • Custom script: call RemoveLocation (udg_UnitPoint)
    • Custom script: call DestroyGroup (udg_FlamestrikeGroup)
Or as you said:

  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Set TriggeringUnitPoint = (Position of (Triggering unit))
    • Set OtherUnitPoint = (Position of (Other unit))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Distance between TriggeringUnitPoint and OtherUnitPoint) Less than or equal to 500.00
        • ((Other unit) has buff Your Buff ) Equal to True
      • Then - Actions
      • Your Actions
      • Else - Actions
    • Custom script: call RemoveLocation (udg_TriggeringUnitPoint)
    • Custom script: call RemoveLocation (udg_OtherUnitPoint)
Hope it helps:)
 
Status
Not open for further replies.
Top