[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