• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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