Building build requirements on tile.

Status
Not open for further replies.
Level 3
Joined
Jan 25, 2020
Messages
5
Hi there,

Is there any way to make Buildable reqirements for some buildings, lets say u can build farm when u have buildable selected, windmill when u have buildable + unblighted selected and Tavern when u have buildable + unblighted + hardground(custom requirement) selected.
Some other way is also good. I just want certain requirement to build some buildings on that spot/tile.
 
Last edited:
Maybe something like this?

or you could use regions instead of Terrain type.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Set VariableSet building_temp_pt = (Position of (Constructing structure))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at building_temp_pt) Equal to Lordaeron Summer - Dirt
        • Then - Actions
        • Else - Actions
          • Game - Display to (All players) the text: ERROR - building mu...
          • Unit - Kill (Constructing structure)
      • Custom script: call RemoveLocation(udg_building_temp_pt)
 
Through some trickery it is possible to perform this evaluation at order time rather than construction time. I forget the exact hackery used but it was used in several old popular maps.

As the event fires before the order is actually issued to the unit, you need to interrupt it later, after the order has been issued. Issuing stop or other attempts to interrupt in response to the order being issued would cause current orders to be interrupted, and the issued order to proceed as normal.
 
Status
Not open for further replies.
Back
Top