In range, Change to hostile.

Grags_1977

Ultra Cool Member
ok, I'm trying to make my Hostile units Passive until a player gets too close.
So far i've not been able to figure out a decent way to do this without doing a trigger for every single hostile unit in the map.

Any ideas?


EDIT: Example
Trigger:
  • Blah
    • Events
      • Unit - A unit comes within 500.00 of PASSIVEUNIT
    • Conditions
    • Actions
      • Unit - Change ownership of PASSIVEUNIT to Neutral Hostile and Change color
 

BloodySkullz

Active Member
I think you can try:

Trigger 01:
Trigger:
  • Trigger01
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • <Your conditions>
    • Actions
      • Trigger - Add to Trigger02 <gen> the event (Unit - A unit comes within 500.00 of (Triggering unit))


Trigger 02:
Trigger:
  • Trigger02
    • Events
    • Conditions
    • Actions
      • Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Change color


Or you can use Timers and make a periodic check.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
You could make the units Rescuable, then use the A unit Is rescued event to make it hostile.
Trigger:
  • Hostility
    • Events
      • Unit - A unit Is rescued
    • Conditions
    • Actions
      • Unit - Change ownership of (Triggering unit) to Neutral Hostile and Change color
 

Grags_1977

Ultra Cool Member
Thank you both. Went with KaerfNomekops Idea. Worked a treat thanks a lot!

+Rep

EDIT: Hmm how does one give rep these days?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Thanks for the context.
    +1
  • The Helper The Helper:
    Happy Hump Day!!!
  • Blackveiled Blackveiled:
    TH old fart gotta have a beer with me one of these days
  • The Helper The Helper:
    I am down anytime Blackveiled
  • Blackveiled Blackveiled:
    count on it then cause you don't live that far from me hah
  • The Helper The Helper:
    really that is cool!
  • The Helper The Helper:
    Hey Tom I added a new Weird tag to the News Prefixes
  • The Helper The Helper:
    What is up Blackveiled?
  • Blackveiled Blackveiled:
    Chillin', lurkin'. :D
  • The Helper The Helper:
    I am working on a bunch of site projects right now doing a bunch of behind the scenes stuff and trying to clean up some stuff that I let slide when I got lazy with the site for a few years...
  • The Helper The Helper:
    Are you in Houston Blackveiled or just in Texas?
  • Blackveiled Blackveiled:
    Houston
  • Blackveiled Blackveiled:
    I've been living here since 2014.
  • The Helper The Helper:
    OK banlord we need to get together soon! The only other member of the site I know in Houston is XXX Conan
  • The Helper The Helper:
    and he does not want none lol
  • The Helper The Helper:
    he put up a picture of his mom one time and she was HOT!
  • The Helper The Helper:
    I wish we still had that
  • Blackveiled Blackveiled:
    Lmao you scared him off I see.
  • The Helper The Helper:
    he will be back
  • The Helper The Helper:
    Conan was like 12 when he started here
  • The Helper The Helper:
    I literally think I was his male role model
  • Blackveiled Blackveiled:
    Yeah I was 12 when I started here as well.
  • The Helper The Helper:
    you guys were just kids
  • The Helper The Helper:
    I was in my 30s when i got the Blizzard MVP
  • The Helper The Helper:
    I am 53

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top