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!
What im trying to do is trigger the map so that if a player's unit dont come within 900 range of any of the computer control units, then give that comp unit a timed life of 30 sec. Can any1 help?
I think he's trying to say that if a unit goes outside the range of a player's units then you add a 30 second expiration timer to it. So you have to stay close to a player's units.
well basically i dont want the map to be crawling wit computer controlled units, hostile creeps basically, so if a human controlled unit don't come within a certain range of them they get a timed life. So there should only be creeps where the human controlled units are at.
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Neutral Hostile)) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to OutOfRange
Add to Group
Events
Conditions
Actions
Unit Group - Add (Triggering unit) to OutOfRange
Remove From Group
Events
Conditions
Actions
Unit Group - Remove (Triggering unit) from OutOfRange
Add Units Init
Events
Time - Elapsed game time is 0.15 seconds
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
Loop - Actions
Trigger - Add to Add to Group <gen> the event (Unit - A unit leaves (Region centered at (Position of (Picked unit)) with size (900.00, 900.00)))
Trigger - Add to Remove From Group <gen> the event (Unit - A unit enters (Region centered at (Position of (Picked unit)) with size (900.00, 900.00)))
Add Units Entering Map
Events
Unit - A unit enters (Playable map area)
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
Actions
Trigger - Add to Add to Group <gen> the event (Unit - A unit leaves (Region centered at (Position of (Triggering unit)) with size (900.00, 900.00)))
Trigger - Add to Remove From Group <gen> the event (Unit - A unit enters (Region centered at (Position of (Triggering unit)) with size (900.00, 900.00)))
This one is for instant kill after 30 sec:
Kill
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Wait 30.00 seconds
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is in OutOfRange) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 100.00)%
And this one's for slow kill. the unit dies in 30 sec (choose one of them >.<):
Kill Copy
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is in OutOfRange) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 3.34)%
Variables used: Unit Group (OutOfRange)
Hope u don't mind the number of triggers
[EDIT]: And.. btw, i haven't tested them, so there might be something wrong. [EDIT2]: i changed some wrong things
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.