• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

1 Type of unit

Status
Not open for further replies.
Level 27
Joined
Dec 3, 2018
Messages
897
I ve got 2 structures: A and B. If i build structure A the workers can t make structure B, it completly disappears from the building meniu. If i build structure B the structure A completly dissapears from the building meniu. This way the players will need to choose between the 2.
IDK what trigger should i make pls help me!
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,011
  • Begin Construction
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Scout Tower
    • Actions
      • Player - Make Farm Unavailable for training/construction by (Owner of (Triggering unit))
  • Cancel or Death
    • Events
      • Unit - A unit Cancels construction
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Scout Tower
    • Actions
      • Player - Make Farm Available for training/construction by (Owner of (Triggering unit))
It's this simple.
 
Last edited:
Level 6
Joined
Jan 16, 2017
Messages
110
  • Melee Initialization
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructing structure)) Equal to Farm
        • Then - Actions
          • Player - Make Barracks Unavailable for training/construction by (Owner of (Triggering unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Constructing structure)) Equal to Barracks
            • Then - Actions
              • Player - Make Farm Unavailable for training/construction by (Owner of (Triggering unit))
            • Else - Actions
If you want something different like after the constuction is finished then just reply
(Seems like Wrda was faster to reply)
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Would be better if you use "A unit finishes construction" instead of "begins construction" just in case the player cancels the construction process. Or, you can simply use the event "A unit cancles construction" to make the other structure available for construction.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
If you disable it after it's built it's possible to construct both structures simultaneously as long as one starts before the other finishes. Wrda's trigger addresses that; he just wrote the wrong event for the second trigger (it should be cancels construction like you suggested).
 
Status
Not open for further replies.
Top