In my map I tried to integrate an very simple AI, which basically just walks around the map and collects items, but also defends itself when attacked.
Edit: Another question: How can I add a loop to the random movement so the AI walks to another random point after reaching the first random point (not just to the first one and then stops)
-
Untitled Trigger 001
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet Group_AI = (Units owned by Neutral Hostile.)
-
Unit Group - Pick every unit in Group_AI and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Not equal to (Order(move))
-
(Current order of (Picked unit)) Not equal to (Order(attack))
-
-
Then - Actions
-
Set VariableSet loc_Arena = (Random point in Region 000 <gen>)
-
Unit - Order (Picked unit) to Attack-Move To loc_Arena
-
Custom script: call RemoveLocation(udg_loc_Arena)
-
-
Else - Actions
-
-
Unit Group - Order Group_AI to Right-Click (Random item in (Region centered at (Position of (Picked unit)) with size (300.00, 300.00)))
-
-
-
-
Edit: Another question: How can I add a loop to the random movement so the AI walks to another random point after reaching the first random point (not just to the first one and then stops)
Last edited: