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

How do I make players not attack each other.

Status
Not open for further replies.
Level 13
Joined
Sep 14, 2012
Messages
437
@Jampion
  • Events
    • Unit - A unit is issued an order targeting an object
  • Conditions
  • Actions
    • Player Group - Pick every player in (Ally) and do (Actions)
      • Loop - Actions
        • If(Conditions are True)then do (Then Actions)else do(Else Actions)
          • If - Conditions
            • (Owner of (Attacking unit)) Equal to (Owner of (Picked Player))
          • Then - Action
          • Else - Action
This is What i got so far, Help me out.
 
Last edited:
Level 16
Joined
Mar 25, 2016
Messages
1,327
Not so complicated. :)
  • Attack Stop
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacked unit)) is an ally of (Owner of (Attacking unit))) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop
You have a few options there. You can change the event from detecting the attack to detecting the order given.
You can also use other orders. For example have the unit follow the target or have the unit attack move towards the target point.

I personally would go with detecting the order and ordering the unit to attack move to the position of the target unit when the order is given. Then a missclick on an allied unit would mean no harm.
 
Status
Not open for further replies.
Top