![]() | |
| | #1 |
![]() Join Date: Feb 2008
Posts: 1
![]() | Hello, I've been racking my brain attempting to figure out a solution to this. What I'm trying to do is make the starting buildings (i.e., the Town Hall, Tree of Life, Great Hall, etc., and their upgrades of course. But not those Town Halls, etc, that they create after the starting ones.) invulnerable, until a particular unit is killed off. The only problem is: The only way I can figure out how to do that is to plop those buildings down and make those buildings invulnerable until said event is performed, which would limit choices among races when playing to what I have plopped down, instead of simply allowing the player to choose their race and allow WC3 to automatically create those starting buildings/units. What I'm going for is the ability to still allow people to choose their race, and make their starting building invulnerable, so that no one can win until a particular mob is killed. Then they can commence killing off each other. Any suggestions on to how I might be able to do this? Thanks! |
| | |
| | #2 |
![]() Join Date: Sep 2006 Location: Your Mom
Posts: 2,241
![]() | Re: Starting buildings invulnerable until... Code: Map Initialization ( after Create Starting Units )
Conditions
Actions
Pick Every Unit in Units ((Matching Unit) is a Town Hall Unit = True OR (Matching Unit) is a Worker = True)
Loop - Actions
Unit - Make (Picked Unit) Invulnerable Code: A Unit Enters (Playable Map Area) Conditions Actions Unit - Make (Triggering Unit) Invulnerable Code: A Unit Dies
Conditions
(Triggering Unit) == Specific Unit That You Want
Actions
Pick Every Unit in (Units Owned by (Owner of (Triggering Unit))) and do actions
Loop - Actions
Unit - Make Unit Vulnerable |
| | |
| | #3 |
![]() Join Date: Feb 2008
Posts: 10
![]() | Re: Starting buildings invulnerable until... in the object editor, give every building unit that would ever be invulnerable the invulnerable ability, and use this trigger below or copy it from map attached Code: Vulnerablize
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
InvulernableUnit[(Player number of (Picked player))] Equal to No unit
Then - Actions
Set InvulernableUnit[(Player number of (Picked player))] = (Random unit from (Units owned by (Picked player) matching ((((Matching unit) is A structure) Equal to True) and ((Level of Invulnerable (Neutral) for (Matching unit)) Equal to 1))))
Else - Actions
Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) Not equal to InvulernableUnit[(Player number of (Picked player))]) and ((((Matching unit) is A structure) Equal to True) and ((Level of Invulnerable (Neutral) for (Matching unit)) Equal to 1)))) and do (Actions)
Loop - Actions
Unit - Remove Invulnerable (Neutral) from (Picked unit) |
| | |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| General starting buildings | Kotohunter | World Editor Help | 2 | 03-03-2008 12:46 AM |
| Gold x# of buildings | DarkBlade | World Editor Help | 8 | 10-22-2007 03:32 AM |
| Unit editor basic guide | Halakbalakbalak | Submit a Tutorial [World Editor] | 1 | 10-19-2007 02:18 PM |
| Starting Location Problem(s) | DarkBlade | World Editor Help | 7 | 04-26-2007 01:48 PM |
| New clan starting up | meks | Po-Talk | 10 | 01-01-2007 08:20 PM |