• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Patrol pattern keeps breaking...

Status
Not open for further replies.
Level 2
Joined
May 9, 2015
Messages
24
Hi, I need help with making a Hero unit patrol between two different regions.

I fixed the actual patrol command, so that worked out. The problem is that when the unit attacks enemies on the way, it breaks his patrol pattern and makes him stop where he was attacked.
How do I keep him patrolling after he has killed those enemies?

(What I am looking for essentially is something similar to Uther's patrol pattern in the second Human mission in Reign of Chaos.)
 
You can periodically check if unit has currently no-order, and then re-order it to patrol/attack.
One also could periodically check distance from hero to patrol line, in case one wants to prevent unit from running too far away in case of a fight, or chase.
You might check out the GUI reade triggers here Patrol System v1.6, if you want use a system.
 
Level 2
Joined
May 9, 2015
Messages
24
You can periodically check if unit has currently no-order, and then re-order it to patrol/attack.
One also could periodically check distance from hero to patrol line, in case one wants to prevent unit from running too far away in case of a fight, or chase.
You might check out the GUI reade triggers here Patrol System v1.6, if you want use a system.

I don't have the Jass thing downloaded, I am not very familiar with that tool/ program. Is there a way to achieve the same effect but with classic World Editor triggers?
 
Editor from patch 1.26 does indeed not natively support vJASS. JASS is supported though.
If I was you, I anyways would use other editor in this patch version. "World Editor Extended" or JNGP. You can read it and some other parts here. Elemental Coder Guide

But the system was marely a suggestion. You for sure can mimic such behaviour using GUI. But if course would mean spending some time with triggering.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Or just use 'Attack Move' order instead and make these end points a region that could re-order the unit to 'Attack Move'?
In conjunction with periodic failsafe checks... you can achieve it. And that is if you don't want to run on advanced techniques.
 
Level 2
Joined
May 9, 2015
Messages
24
Editor from patch 1.26 does indeed not natively support vJASS. JASS is supported though.
If I was you, I anyways would use other editor in this patch version. "World Editor Extended" or JNGP. You can read it and some other parts here. Elemental Coder Guide

But the system was marely a suggestion. You for sure can mimic such behaviour using GUI. But if course would mean spending some time with triggering.


What does GUI stand for?
 
Level 2
Joined
May 9, 2015
Messages
24
Or just use 'Attack Move' order instead and make these end points a region that could re-order the unit to 'Attack Move'?
In conjunction with periodic failsafe checks... you can achieve it. And that is if you don't want to run on advanced techniques.

Thank you for that suggestion. I will certainly try it out!
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Yes, just put a band-aid for the interruptions the game may bring to the unit.
Like when a unit casts an ability, it would surely break the order and that would need you to re-order it when it finishes casting an ability.
Or just order the unit constantly via periodic trigger and make a separate triggers for a unit that enters these regions with flags to switch.
Then the flag is used to determine what route a unit should be ordered to in periodic via condition.

If you wanted it on multiple units, you may need to set the flag data for each unit via indexing so they have their own flags.
 
Status
Not open for further replies.
Top