• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Build structure

Status
Not open for further replies.
Level 21
Joined
Aug 21, 2005
Messages
3,699
Don't use a large red capitalized font. Just don't.
There's no way to enqueue orders via triggers.

What you could do instead:
  • Unit - Order Peasant 0002 <gen> to build a Barracks at (Center of (Playable map area))
Then, create a trigger that detects when a barracks was finished / canceled, and issue the constructing peasant to mine gold at the nearest goldmine.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Cancels construction
      • Unit - A unit Finishes construction
    • Conditions
      • ((Unit-type of (Cancelled structure)) Equal to Barracks) or ((Unit-type of (Constructed structure)) Equal to Barracks)
    • Actions
      • Unit - Order (Triggering unit) to Harvest (Gold Mine)
Where (Gold Mine) is the nearest gold mine (pick every unit near the triggering unit, check if it's a gold mine, and store the "nearest" gold mine in a variable)

See http://www.hiveworkshop.com/forums/...queue-orders-via-jass-shift-click-game-64996/ for a basic idea of scripting an order queue
 
Um, I don't want to get in the middle of any debate but I have a suggestion for the trigger....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unit - Unit starts construction

(Whatever conditions you need here)

Turn on trigger (that finishes construction)
Set (triggering unit) = Builder
Set (constructing unit) = Building

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Trigger that finishes construction.]

Time - Every 0.5 Seconds

Unit - Order Builder to repair Building

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Finally reset the whole thing.]

Unit - Unit finishes construction

(conditions as desired)

Turn off - Trigger that finishes construction
Unit - Order unit to harvest gold

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To make it MUI, you might need to add indexing.

My apologies if this is dumb and does not help.
 
Status
Not open for further replies.
Top