• 🏆 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!

[General] Unit patrol problem

Status
Not open for further replies.
Level 2
Joined
Feb 10, 2017
Messages
19
I'm trying to let a unit patrol, then it should wait a second at their current position (checkpoint A), then patrol back to the previous point (checkpoint B); and all that in a loop.

Right now the unit either just keeps standing on one checkpoint or it patrols without waiting at the checkpoint everytime it passes it.

Image is attached, i dont understand what i did wrong.
 

Attachments

  • wc3editorhelp.PNG
    wc3editorhelp.PNG
    18.8 KB · Views: 65
Level 7
Joined
Apr 17, 2017
Messages
316
Why did you use loop in the first place ? You want him to patrol 10 times ? You also dont have to use stop command cause in the end, all patrol does is attack move to a location then get back to first point right ? So you can use attack-move then check if the target unit is at that point if so, wait then order him to attack move to starting point.
 
Why reduce the range of wait's usage for approved spells?

1) For most spells it makes often more sense to have a periodic tracking anyways, and also the accuracy matters more for spell standards.
Also, often data Structures are used here to bind data to instances, and to achieve MUI. It's less good and harder to handle, putting all data structure stuff into 1 single trigger, and handle it with waits, than "just" looping over all instances -- where timing can be handled in a good and dynamic way, too.

2) We are not even in Jass, or Spells Section, and using best tequiniques doesn't matter most. Simply, a user has a problem with his project. Now do look at submissions in Maps Section, where most hivers submit their projects, and good luck telling Waits are not useful and to be replaced by Jass Timers best.
 
Level 2
Joined
Feb 10, 2017
Messages
19
Make 2 triggers with the event for "A Unit Enters Region", one for each of the checkpoint respectively. When unit enters the region, you might check for correct unit within conditions, you wait 1 second, and order it to go further. Waits are fine, when knowing how to use them. :)
It worked.
Thanks.
 
Status
Not open for further replies.
Top