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

How to allow certain buildings to be built on certain terrain tiles?

Status
Not open for further replies.
Level 7
Joined
Mar 9, 2016
Messages
226
I decided to add a farming system to my map, its working fine. However, i don't want users to be able to plant on snow, ice and desert terrain tiles.

--------------------

A unit places a building, after a time has passed and building has completed it turns into a certain plant item that can be sold to the markets.
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
There's not going to be a way to modify it so the pathing map shows red squares over the ground in snow/desert. The best you can do is detect when a unit is issued the order to build a farm, check if it's in valid terrain (there's a 'terrain type at LOCATION' check), and if not order the unit to stop while displaying a custom error message with something like SimError.
__________

In the OE make the building a shop that sells 1 of the plant item with 0 initial in stock, 1 max stock, and the recharge time being how long you have to wait for it to mature. With a trigger catch when the building sells the plant item and remove the building from the game.
 
Status
Not open for further replies.
Top