• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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 45
Joined
Feb 27, 2007
Messages
5,578
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