How to order all units to attack my base?

panzer

New Member
Reaction score
0
Hi guys!

I just wanted to know how to order all the units in region x to attack my

base ONCE all the units in all the baracks finish training!

A simple question but it is taking me ages to solve
Thanks for your Help!:thup:
 

Bogrim

y hello thar
Reaction score
154
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Region x <gen> contains (Trained unit)) Equal to True
    • Actions
      • Unit Group - Add (Trained unit) to SpawnGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in SpawnGroup) Equal to QueuedUnits
        • Then - Actions
          • Set Temp_Point = (Center of Enemy Base Region <gen>)
          • Unit Group - Pick every unit in SpawnGroup and do (Unit - Order (Picked unit) to Attack-Move To Temp_Point)
          • Unit Group - Remove all units from SpawnGroup
          • Set QueuedUnits = 0
          • Custom script: call RemoveLocation( udg_Temp_Point )
        • Else - Actions

Whenever you queue a unit, increase the integer variable "QueuedUnits" by 1. This will allow you to keep track of how many units are queued. If you want this to work for multiple players, use arrays.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top