1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

How to make buildings exclusive

Discussion in 'Triggers & Scripts' started by Liam, Oct 1, 2018.

  1. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    Hey was wondering if anyone could help me with making 2 different buildings exclusive?

    My idea is to allow a player to choose one of six unit producing buildings each tier and to lock out the others each tier till they choose their third building and to lock out the last 3.

    Im inexperienced with triggers but figured that would be where to set it up, the lock out should happen as soon as the building is selected to be built to prevent getting 2 buildings out.
     
  2. RG00

    RG00

    Joined:
    Jun 4, 2017
    Messages:
    172
    Resources:
    1
    Maps:
    1
    Resources:
    1
    You need to use this action:
    • Player - Limit training of Your Building to 0 for Player (Red)


    When you set the number to "0" you will make your building unbuildable, if you then want to unlock it again you can set the number to "-1" to make your building be able to be built without limitations.

    As for the trigger event you could use this:
    • Unit - A unit is issued an order targeting a point


    with a condition to make the trigger select not every order that you order but only the build order of a specific building:
    • (Issued order) Equal to (Order(<insert your building name here>))


    I didn't test it still, but I think it should work.
     
    Last edited: Oct 1, 2018