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

Unit patrolling whole map

Status
Not open for further replies.
Level 5
Joined
Jan 22, 2023
Messages
51
How to make unit patrol whole map around (and attack units that get in aquisition range of the unit, since I know that if unit patrols - it won't attack nearby enemies). I only saw that I can make it patrol to certain point/region, but don't know how to make it patrol the map all way around and repeat that during the whole game
 
Level 9
Joined
May 19, 2016
Messages
153
Well you could - Order Unit to - Attack walk to - Random Point in ''region'' or Playable map
With the phrase Attack walk it should attack everything on its way.
 
Level 5
Joined
Jan 22, 2023
Messages
51
What if i'd like this unit to go in circle on the whole map? Like on the attached file, going in circle in loop endlessly
 

Attachments

  • Bez tytułu.png
    Bez tytułu.png
    4.7 KB · Views: 11
Level 20
Joined
Jun 27, 2011
Messages
1,864
Simplest way to do this is by creating "breadcrumb" regions the unit attack-moves into (you will need to use more regions for smoother circles). The last one will link to the first one to repeat the cycle endlessly. I've attached a demo as an example.
 

Attachments

  • patrol_breadcrumb_test.w3m
    13.9 KB · Views: 2
  • World_Editor_qJVVlWzbPh.png
    World_Editor_qJVVlWzbPh.png
    1.9 MB · Views: 19
Level 16
Joined
May 2, 2011
Messages
1,350
(since I know that if unit patrols - it won't attack nearby enemies).
I doubt your knowledge, unliss something has change with the updates?
last time I checked patrolling units did attack anyone who comes close in acquisition range, and the only except if they were set to patrol your hero and the hero is moving, not attacking.

patrolling your hero will make units imitate what your hero is doing, moving if he moves and battling if he battles.
 
Level 5
Joined
Jan 22, 2023
Messages
51
Thank you all for help! Everything works now :thumbs_up:
Edit: Nevermind, it worked only for first two regions. It enters first region, goes to the second one, and goes back to the first one and so on. Even though i set it to "unit enters 2nd region - patrol to 3rd region" and so on
  • Fel Reaver 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Order Fel Reaver 0675 <gen> to Patrol (Center of Fel Reaver 1 <gen>)
  • Fel Reaver 2
    • Events
      • Unit- A unit enters Fel Reaver 1 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Fel Reaver
    • Actions
      • Unit - Order Fel Reaver 0675 <gen> to Patrol (Center of Fel Reaver 2 <gen>)
  • Fel Reaver 2
    • Events
      • Unit- A unit enters Fel Reaver 2 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Fel Reaver
    • Actions
      • Unit - Order Fel Reaver 0675 <gen> to Patrol (Center of Fel Reaver 3 <gen>)
He doesn't go to Fel Reaver 3 region, he goes back to first one (inb4: way to 3rd region isn't blocked by any means)
 
Last edited:
Status
Not open for further replies.
Top