• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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