• 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.

No Multitasks at Buildings

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
Oke it might sound wierd (the title that is) but my questions will help out to show my problem.
I hope it's possible to do, anyway here it goes:

Q: When I have multiple buildings of the same type selected I don't want them to be able to upgrade them/make them train units at the same time, is this possible? I like only want them to be able to train and upgrade if 1 is selected.
A: ???

Note: I already have a solution for the upgrade problem, (by using a custom ability on the main builder that selects the building u want to upgrade, but since buildings can train/upgrade more it's rather impossible to do it that way.

Q2: If that's not possible, are there any other possibillties?
A2: ???

Second Note: I want to know this because I'm planning to make a map that has multiple resources since it's more about building then fighting, it will have resources like, gold, silver, bronz, iron, wood, refined versions of the raw materials, gold, weapons, it will also have stuf like happyness and popularity that will affect what u can and can't make.

Oh yeh, a final motivation: unlike most people I do/can rep people that help... xd
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
For the first, I've came up with a concept, but I can't think of a way to finish it in GUI. Maybe if you can manage to check if there are no more units in a unit group except the triggering unit (in GUI or JASS), that you can complete the trigger. This is what i've got:

  • No More Double Training
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Barracks
          • (TrainingBarracks is empty) Equal to False
        • Then - Actions
          • Unit - Pause (Triggering unit)
          • Unit Group - Add (Triggering unit) to TrainingBarracks
          • Wait until <NO MORE UNITS IN UNIT GROUP EXCEPT TRIGGERING UNIT>, checking every 0.10 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Barracks
            • Then - Actions
              • Unit Group - Add (Triggering unit) to TrainingBarracks
            • Else - Actions
  • Stopped training
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Barracks
    • Actions
      • Unit Group - Remove (Triggering unit) from TrainingBarracks
And for the second question: You can make a hell load of If/Then/Else triggers for that.
  • If/Then/Else
    • If - Conditions
      • You build a statue of yourself
    • Then - Actions
      • Set Popularity = Popularity + 1
    • Else - Actions
  • If/Then/Else
    • If - Conditions
      • Popularity is equal or higher then 10
    • Then - Actions
      • Player - Make Bigger Statues available for training/construction by Player 1 (Red)
    • Else - Actions
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
Lol, my second question was to find a solution if there was no anwser for the first question.. xD
I already have the systems that will be used to gather resources and to gain popularity and stufz. :p

Second note was just to tell people, why I want this no multitalking thing.

Thanks for your help, I'll try it out. Still looking for alternatives. +Rep for yo help.
 
Status
Not open for further replies.
Top