• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Waking up units

Status
Not open for further replies.

Wondahbread

W

Wondahbread

Hi I was wondering if anyone could give me some help, I am trying to make a trigger where when unit A is asleep and then Unit B gets within 200 range then unit A wakes up. To be honest i have no idea where to even start i have done many other triggers but this one has given me a lot of trouble.
 
Sorry, I should have been more specific because this is concerning units that have been spawned over time not one that has already existed.
 
Trigger1

Events
Every 0.1 seconds of game time
Conditions
Actions
Set T_Group = (Units in (Playable Map Area) matching (((Matching unit) is sleeping) Equal to True))
Unit Group - Pick up every unit in (T_Group) and do (Actions)
Loop - Actions
Set Picked = (Picked unit)
Trigger - Add to Trigger2 <gen> the event (A unit comes within 200.00 range of (Picked))
Custom script: call DestroyGroup (udg_T_Group)


Trigger2

Events
Conditions
Actions
Unit - Wake up (Picked)
Custom script: set udg_Picked = null
 
Status
Not open for further replies.
Back
Top