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

[Trigger] Waking up units

Status
Not open for further replies.
Level 2
Joined
Aug 5, 2008
Messages
9
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.
 
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
 
Level 11
Joined
May 31, 2008
Messages
698
You cant set multiple units to a unit variable
Just do this
Every 1 second
Pick all units in map
add to trigger 2 a unit comes in 200 of picked unit

Trigger2
If triggering unit is sleepin
Wake up triggering unit
 
Status
Not open for further replies.
Top