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

Order units to select regions to patrol/attack-move

Status
Not open for further replies.
Hello there, may i ask how do i properly order units to attack-move/patrol at regions? My trigger doesn't seem to work properly here (I did not post this in triggers section because this seems to be an AI issue). The problem is the units seem to forget their order to move to another location once they initiated an attack to an enemy. Sometimes they do not also respond to a triggered action aswell (See the video). I did raise the values in the Gameplay Constants but that doesn't seem to change anything. I cannot change it to move action because the intention is to make them attack when they see obstruction between point A to point B, and then return to order of moving to point B when the enemy is dead.


Untitle2d.png


Untitled.png


  • Travel Disable Guard AI
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • AI - Ignore the guard positions of all Player 1 (Red) units
      • AI - Ignore the guard positions of all Player 2 (Blue) units
      • AI - Ignore the guard positions of all Player 3 (Teal) units
(When i disable this they will return to where they spawned/placed in the editor)

  • Travel Enter 1
    • Events
      • Unit - A unit enters Waypoint01 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint02 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint04 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 2
    • Events
      • Unit - A unit enters Waypoint02 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 3
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint03 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint06 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 3
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint01 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 3
    • Events
      • Unit - A unit enters Waypoint03 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint02 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint08 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 4
    • Events
      • Unit - A unit enters Waypoint04 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 3
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint01 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint05 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 3
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint10 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 5
    • Events
      • Unit - A unit enters Waypoint05 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 3
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint04 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint06 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 3
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint07 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 6
    • Events
      • Unit - A unit enters Waypoint06 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint05 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint02 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 7
    • Events
      • Unit - A unit enters Waypoint07 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 3
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint05 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint09 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 3
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint08 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 8
    • Events
      • Unit - A unit enters Waypoint08 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint07 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint03 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 9
    • Events
      • Unit - A unit enters Waypoint09 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint10 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint07 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
  • Travel Enter 10
    • Events
      • Unit - A unit enters Waypoint10 <gen>
    • Conditions
    • Actions
      • Set Travel_Index = 2
      • Set Travel_RandomPick = (Random integer number between 1 and Travel_Index)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 1
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint09 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Travel_RandomPick Equal to 2
        • Then - Actions
          • Set Travel_Point = (Random point in Waypoint04 <gen>)
        • Else - Actions
      • Unit - Order (Triggering unit) to Attack-Move To Travel_Point
      • Custom script: call RemoveLocation(udg_Travel_Point)
(Even if if remove the custom scripts that destroys the location it is still happening)
 
Last edited:
Status
Not open for further replies.
Top