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

Building build requirements on tile.

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:
Level 18
Joined
Mar 16, 2008
Messages
721
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)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
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.
 
Top