• 🏆 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!

Need help please

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2012
Messages
8
I am posting this because I need help with a trigger kinda like castle fight.
I don't know how to make a trigger to make a building (that has a trigger to make it automatically train a unit every so many seconds) upgrade to a new building and then train the new unit from the upgraded building every so many seconds. Help would be much appreciated. Thanks.


Also as another question: How can I make it so that when a player gets a builder that can build gold mines how to make the gold mine's gold set to 15,000 so when the gold mine is built it can be mined and the gold amount will be 15,000?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
you don't have to train a unit every x seconds, you just need to order them again after a unit is trained (look trigger "Train 1" and "Train 2").

this is the trigger for the building that's constructed by the builder.

  • Train 1
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructed structure)) Equal to Barracks
        • Then - Actions
          • Unit - Order (Constructed structure) to train/upgrade to a Footman
          • Unit - Order (Constructed structure) to train/upgrade to a Footman
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructed structure)) Equal to Ancient of War
        • Then - Actions
          • Unit - Order (Constructed structure) to train/upgrade to a Archer
          • Unit - Order (Constructed structure) to train/upgrade to a Archer
        • Else - Actions
  • Train 2
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Unit - Order (Triggering unit) to train/upgrade to a (Unit-type of (Trained unit))
this is after the building is upgraded.

  • Upgrading
    • Events
      • Unit - A unit Finishes an upgrade
    • 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 2
        • Then - Actions
          • Unit - Order (Triggering unit) to train/upgrade to a Gryphon Rider
          • Unit - Order (Triggering unit) to train/upgrade to a Gryphon Rider
        • Else - Actions
and this is for the gold mine.

  • Set Gold Mine
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Gold Mine
    • Actions
      • Neutral Building - Set (Constructed structure) to 15000 gold
OR you just set it via object editor, the ability is called "Gold Mine Ability", search them on "Abilities" tab > Neutral Passive > Gold Mine Ability, and set the 'Data - Max Gold' to 15000.

Here is the test map.
 

Attachments

  • o.w3x
    17.2 KB · Views: 54
Level 2
Joined
Nov 4, 2012
Messages
8
Wait I have another question.
How would I set up the first trigger so that instead of a unit building a building that builds units that building is already built when the game starts and it still auto builds?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
First, try not to double post, merge them up.

Next, elaborate on your question,
Wait I have another question.
How would I set up the first trigger so that instead of a unit building a building that builds units that building is already built when the game starts and it still auto builds?

that's really confusing.
 
  • Temp
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Barracks) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to train/upgrade to a Footwarrior
Edit: then when a unit trains use twovenomous' trigger Train 2
Edit 2: BTW use ANOTHER trigger for this
 
Level 2
Joined
Nov 4, 2012
Messages
8
I didn't mean to double post It was the fact that I forgot to ask it from the beginning. Also sorry it was confusing I just couldn't think of any other way to say it :/
Thanks though.
And your welcome Kyousuke Imadori haha
 
Status
Not open for further replies.
Top