• 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] How do i make guards attack you if you attack a villager?

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Passive
      • ((Owner of (Attacking unit)) controller) Equal to User
    • Actions
      • Player - Make Neutral Passive treat (Owner of (Attacking unit)) as an Enemy
      • Player - Make (Owner of (Attacking unit)) treat Neutral Passive as an Enemy
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The rep button is that v/x button under people pictures.

To stop them attacking make it like this

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Passive
      • ((Owner of (Attacking unit)) controller) Equal to User
    • Actions
      • Player - Make Neutral Passive treat (Owner of (Attacking unit)) as an Enemy
      • Player - Make (Owner of (Attacking unit)) treat Neutral Passive as an Enemy
      • Wait X seconds
      • Player - Make Neutral Passive treat (Owner of (Attacking unit)) as an Ally with shared vision
      • Player - Make (Owner of (Attacking unit)) treat Neutral Passive as an Ally with shared vision
 
Level 7
Joined
Oct 6, 2006
Messages
293
What i would do would be to do that plus add on some triggering where it checks the distance from the guard so if the guards are across the town and u attack the peasant they shouldnt be able to see you so they wouldnt come to attack you.
 
Level 8
Joined
Dec 8, 2007
Messages
312
That's easy.
make that after you attacked villagers there will be started timer.
Make trigger that will make guards not attack you after timer expires.
And make another trigger that will increase timer's time after you get attacked by guards (or keep attacking more villagers).
 
Level 13
Joined
Sep 24, 2007
Messages
1,023
like say their is only one guard around where you killed the villiger you deiced not to attack him and you run you then run past another guard would that second guard try to attack you even tho you didnt do anything wrong infront of him?
 
you could just order guards in range to attack you and then go back to their spots after you get out of range.
Try instead of makeing all neutral passives ur enemy, change owner of the chaseing guard to hostile for untill he re-enters his starting region, he should run after you like creeps do in melee but once he comes back he becomes passive again
 
Status
Not open for further replies.
Top