Building Help

Terasat

New Member
Reaction score
0
I am making a map where a building creates a unit, then it goes and builds a farm, after 10 farms it returns to the castle and is removed from the map.

The problem is I get it to build the first farm, then it stands there, I can't get it to build a second one. Any ideas?

Part of the trigger I am using is

JASS:
Keep Building TIll 10
    Events
        Unit - A unit Finishes construction
    Conditions
        And - All (Conditions) are true
            Conditions
                (Owner of (Triggering unit)) Equal to Player 12 (Brown)
                (Number of living Farm units owned by Player 12 (Brown)) Less than 9
    Actions
        Unit - Order (Triggering unit) to build a Farm at (Random point in Town Build <gen>)


Now I found that The Triggering unit is the unit built, not the unit that did the building. How would I get the information from the unit that did the building so I can send it to build another farm?

Or at least a trigger that would send a unit from player 12 to build at another location if it has nothing to do.

I have tried several things and have yet to figure out how to get this script to work properly. :banghead:
 

Annun

New Member
Reaction score
0
I don't see a condition for Building/Constructing Unit anywhere.

I guess you could add the builder into a variable and instead of ordering (triggering unit) to build another farm, you could order the variable. This may get tricky if you have more than one builder up at a time (I'm not that experienced)
 

Accname

2D-Graphics enthusiast
Reaction score
1,465
you cannot get the builder of a building. there have been several systems to simulate it though i think none of them was flawless.

best bet would be to save the builder when its been created and check periodically for its current order. is its current order "build a farm" then you know its still building. is its current order not equal to "build a farm" then you can order it to build the next.
 
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