• 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 make a unit stop constructing?

Status
Not open for further replies.
Level 4
Joined
May 17, 2011
Messages
106
Hello!

Here's the thing. I am making a Tower Defense type map.

So here is what I want:

-When a player build a tower outside his region (so anywhere else on the map) I want the unit to stop constructing the tower and the tower to be destroyed.

Problem is, I don't know which condition to use... I'm looking for something like:

if (unit being constructed isn't in a region belonging to the player constructing the building) then actions (cancel order, destroy building)

I could just make the unit being teleported back to its region if it enters a region that doesn't belong to it but I'd like to know if there's a way to make my first idea come true.

Thanks!
 
Status
Not open for further replies.
Top