Problem with a trigger

Maapik

New Member
Reaction score
3
Now my trigger working,I have heard that Locust don't work with "Unit Group - Pick every unit in ...."
This is the trigger I'm using.It's an invisible unit that build the building and then the workers with locust go finish the construction by using "Repair".The problem is that I'm using Unit-group :
Trigger:
  • Builders
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Menu
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (City_Area_Chosen[(Integer A)] contains (Triggering unit)) Equal to (==) True
            • Then - Actions
              • Unit Group - Pick every unit in (Random (Random integer number between 1 and 3) units from (Units in City_Area_Chosen[Number] matching ((Unit-type of (Matching unit)) Equal to (==) Builder))) and do (Actions)
                • Loop - Actions
                  • Unit - Order (Picked unit) to Human Peasant - Repair (Constructing structure)
            • Else - Actions
 

Yoshii

New Member
Reaction score
74
order him then give him locust ability dont give him the locust as a normal ability
 

jwallstone

New Member
Reaction score
33
Why not use the Undead race's build ability? The building will complete on its own without the need for a unit to repair it.

If you really want the units to repair it, if that's part of the plan, then you could also:
1. Store the locust units into variables, so that you can access them and give them orders later.
2. Give them the Ward classification. Disables the command card so the user can't control them. Make sure to disable the "smart" order by triggers.
 

Maapik

New Member
Reaction score
3
order him then give him locust ability dont give him the locust as a normal ability

Yes but I don't want the worker to be selectable :/
I tried
Trigger:
  • Builders
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Menu
    • Actions
      • Player - Disable Locust for (Owner of (Triggering unit))
        • Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (City_Area_Chosen[(Integer A)] contains (Triggering unit)) Equal to (==) True
              • Then - Actions
                • Unit Group - Pick every unit in (Random (Random integer number between 1 and 3) units from (Units in City_Area_Chosen[Number] matching ((Unit-type of (Matching unit)) Equal to (==) Builder))) and do (Actions)
                  • Loop - Actions
                    • Unit - Order (Picked unit) to Human Peasant - Repair (Constructing structure)
              • Else - Actions
      • Player - Enable Locust for (Owner of (Triggering unit))

But still don't work
 

Moridin

Snow Leopard
Reaction score
144
If you REALLY need those builders to be there you could assign variables for them when they're created and order them using those variables.

Otherwise just set the race of the buildings to Undead and they'll build by themselves.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top