HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Preventing the Building of Spawn Towers

12-02-2003, 03:39 AM#1
Xinlitik
Hey guys,

I am using a trigger that creates a number of units each spawn equal to the number of that unit's tower in the spawn area.... but I have a bit of a problem. :(

How can I stop players from building outside the designated areas, and how can I limit players to building less than or equal to 4 towers per area. I know there's a way.. ToB does it. I'm stumped, though. I havent done, well, anything with building triggers hehe.

Help is appreciated.

Thanks in advance.
12-02-2003, 08:14 AM#2
HEZZA
Either make a region where u WANT them to build or Make a region where u dont want them to build saying

A unit starts construction

building = to what ever

instantly remove builidng
add gold , wood (how much it cost)



If its one these maze TDS or AOS what ever it may take many or u could do the hard way and make 1 massive huge one and have a very complicated trigger....:bgrun:
12-02-2003, 09:51 PM#3
Xinlitik
Hmm.. but where in that trigger is it stopping them from building in the wrong area?
12-02-2003, 11:27 PM#4
SpectreReturns
Try this:


A unit (generic) starts construction

If ((Region Contains: (Building being constructed)) and (Building == Spawn Tower)
Then (Do Nothing)
Else Do: Add (Building being constructed) to (Player(Owner of Unit(Building being constructed))
Force (Player(Owner of Unit(Building being constructed))) to press ESC/Cancel
12-02-2003, 11:30 PM#5
Biflspud
Without seeing the map, it's difficult to help you. Are there pre-defined regions where it is ok for a player to build in? If a player attempts to build outside of the area given to them, Hezza's trigger idea should work. It won't STOP them from building, but it will kill their tower and give them the money back for it, essentially preventing them from building it.

As far as 4 or less towers goes, that's the same thing -
Event: Unit enters Player 1 region
Condition: Entering unit = Spawn Tower
Region = PlayerRegion
Unit count of Units of type Spawn Tower in PlayerRegion > 4
Action: Kill entering unit, refund $, warn the player not to do that.

Understand?
12-03-2003, 01:01 AM#6
Ligature
Could you maybe catch the Orders to build towers, check if the building will be outside your safe areas, and then allow/disallow the ordered unit to complete its order? (by pausing it, ordering it to stop, unpausing it)
12-03-2003, 01:24 AM#7
Xinlitik
Thanks a lot guys.. I'll try those two after I do my homework. :foot: