How do we create a main building ?

Status
Not open for further replies.
Level 2
Joined
May 25, 2016
Messages
12
I want to know how do we do a building that can builds once for eache player and remove from build interface , if it is destroyed or the upgraded build of this one is destroyed to be able to build it again.
 
It's done via the action below.
  • Player - Limit training of *unit-type* to 1 for Player 1 (Red)
While the text says it limits "training" of unit, it does in fact also work for buildings. I actually just tested this only for human race and it immediately removes the building from build menu when you just start the construction of said building.

I imagine its safe for other races as well.


In your case trigger like the one below should suffice:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of Altar of Kings to 1 for (Picked player)
The trigger limits the number of Altar of Kings to one altar per player.
 
Find your base building and set "Techtree - Dependency Equivalents" to all building types it changes into.

Example:
I have Scout Tower, which can change into Guard Tower, Cannon Tower or Arcane Tower. I want to limit my game so only one Scout Tower (or one of its upgraded versions) can be built per player.

First, I will limit number of Scout Towers that can be build via the trigger action I posted in my previous post. Next, I open Scout Tower in Object Editor and find the "Techtree - Dependency Equivalents" and add to that field the Guard, Cannon and Arcane Tower.

This will set the player so he can have only one of the 4 tower types.

Do be aware of creating circular dependence (e.g. Scout Tower has dependency set to Guard Tower, Guard Tower has dependency set to Scout Tower; or larger circles), else the game will crash when you open build menu with such building.
 
Status
Not open for further replies.
Back
Top