Unit groups...

Evil Seal

Member
Reaction score
2
Im making a AI for my AoS map and I don't understand why somethings doesn't work...

Trigger:
  • Asset Starting Lane
    • Events
      • Time - Elapsed game time is 25.00 seconds
    • Conditions
    • Actions
      • Unit Group - Add AI_Hero[1] to AI_MidLaner
      • Unit Group - Add AI_Hero[2] to AI_LeftLaner
      • Unit Group - Add AI_Hero[3] to AI_MidLaner
      • Unit Group - Add AI_Hero[4] to AI_RightLaner
      • Unit Group - Add AI_Hero[5] to AI_MidLaner
      • Unit Group - Add AI_Hero[6] to AI_LeftLaner
      • Unit Group - Add AI_Hero[7] to AI_MidLaner
      • Unit Group - Add AI_Hero[8] to AI_RightLaner

When that is done, I wan't the AI midlaners to go to a point in the midlane.
Trigger:
  • Start Mid Move
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AI_MidLaner and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Center of UpMid <gen>)
          • Unit - Order (Picked unit) to Attack-Move To TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)


The problem is that it doesn't move at all...
 

Inflicted

Currently inactive
Reaction score
63
Only thing I can see right now is that possibly your 'AI_Hero[1]' or 'AI_Hero[3]' or 'AI_Hero[5] or 'AI_Hero[7]' is not being set correctly.

Add a line into your Second Trigger (Start Mid Move) that says the name of the picked unit. That way you will be abnle to check which units are in the Unit Group.

Otherwise it could be your TempPoint has a problem, or something is issuing the units to Stop.
Your Region couldn't be wrong, due to them not moving at all.

Try to isolate things, and discover the actual problem.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
A problem i once had was that i incidently removed a region i didnt want to remove, using the "center of region" function is a little bit dangerous.
You might as well consider saving those important point variables which are not going to change during the game anyways beforehand. Wouldnt need to remove them then also which saves some performance.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top