PoLlama Forums  

Go Back   PoLlama Forums > WarCraft > World Editor Help

Reply
 
LinkBack Thread Tools
Old 02-07-2008   #1
 
Join Date: Feb 2008
Posts: 1
webturtle0 is an unknown quantity at this point
Unhappy Starting buildings invulnerable until...

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!
webturtle0 is offline   Reply With Quote
Old 02-08-2008   #2
 
MrApples's Avatar
 
Join Date: Sep 2006
Location: Your Mom
Posts: 2,241
MrApples has a spectacular aura about
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
Is this what you want?
MrApples is offline   Reply With Quote
Old 02-18-2008   #3
 
SKuLL09's Avatar
 
Join Date: Feb 2008
Posts: 10
SKuLL09 is an unknown quantity at this point
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)
tested with UNDEAD, failproof
Attached Files
File Type: w3x failproof1.w3x (17.7 KB, 9 views)
SKuLL09 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


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


All times are GMT -5. The time now is 08:42 PM.

A friend of Wc3Happy
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165