HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Invulnerability

03-11-2007, 03:41 PM#1
Rykon
Ok, I've been trying for a while and I give up. On a map I'm working on there's a boss with 4 bodyguards... I want the boss to not move, not attack, and either be invulnerable or unselectable, UNTIL his bodyguards are all dead, then I want to replace the invulnerable boss with a different creep that looks just like him but can attack, move, and is attackable.
So far I've figured out how to make him not attack, but that's as far as I've gotten
So basically... invulnerable boss who is doing nothing with 4 bodyguards... once the bodyguards are all dead the invulnerable boss who is doing nothing should be replaced with a different creep, but this one can attack can move can be attacked...
Any and all help would be appreciated!
03-11-2007, 03:53 PM#2
zen87
if u just wanted to disable the boss's attack just add orc's cargo hold ability will do
03-11-2007, 05:49 PM#4
PhoenixFeather
Hmm, perhaps you could pause the boss-unit and give him the Invulnerability-ability? And then unpause him and remove the ability when his guards are dead.
03-11-2007, 06:18 PM#5
W.I.S.P.
and give him locust ability to be unselectable
03-11-2007, 06:27 PM#6
Hydrolisk
Compiled form: Make a trigger that pauses the boss at the beginning of the map, set a unit variable to him, and give him Locust, Cargo Hold, and Invulnerable abilities. Then, make another trigger and unpauses him when his guards are dead and removes all the abilities. (Your going to have to use JASS whether you like it or not if you decide to use Locust.) Finished!
03-11-2007, 07:16 PM#7
Rykon
I tried Pheonix's idea both because it seemed most... simple and did what I wanted it too. It worked, the bos was invulnerable and ddin't attack... but once the guards were all dead the trigger didnt work and the boss is still invulnerable.
03-11-2007, 09:09 PM#8
PhoenixFeather
Then you need a trigger to detect if all the guards are dead. Try counting unit-type in region or similar...
03-11-2007, 10:18 PM#9
Pyrogasm
Quote:
Originally Posted by Hydrolisk
and give him Locust
NO! You can't remove locust easily, and if you do, things get screwed up with the unit.

Rykon, You'll need an integer variable that counts the number of guards that have died, and trigger that looks like this:
Trigger:
Collapse Events
Bodyguard 0001 <gen> dies
----- Repeat the above line for all of your bodyguard units by using the "select a unit" feature when setting up the event, or use unit variables -----
Conditions
Collapse Actions
Set Your_Bodyguard_Counter_Variable = (Your_Bodyguard_Counter_Variable + 1)
Collapse If (All conditions are true) then do (Actions), else do (Actions)
Collapse If - Conditions
Your_Bodyguard_Counter_Variable greater than or equal to 5
----- 5 being the total number of bodyguards, whatever it may be -----
Collapse Then - Actions
Unit - Unpause Boss 0034 <gen>
Unit - Make Boss 0034 <gen> vulnerable
----- If you want any text or special effects, etc., put the actions for them here -----
Trigger - Turn off (This Trigger)
Else
03-11-2007, 11:03 PM#10
Earth-Fury
Quote:
Originally Posted by Pyrogasm
NO! You can't remove locust easily, and if you do, things get screwed up with the unit.

im still unclear as to exactly what happens when you add / remove the locust ability from units. Kind-of back on-topic while beign off-topic, list all the 'screwed up' thigns that happen, and under what circumstances please?
03-12-2007, 12:00 AM#11
Pheonix-IV
If you remove the locust ability from units? Nothing. They stay locust'd.

Though i believe if you pause/unpause the unit after removing locust then they return to normal, but the health bar and selection circles are now missing (you get teh same effect if you give the selection circle a negative size.)
03-12-2007, 12:46 AM#12
Pyrogasm
Also, they will not be auto-accquired as targets, and units will not attack them unless ordered to.
03-12-2007, 01:40 AM#13
Hydrolisk
Oh crap, I totally forgot that Locust can't be removed easily. What was I damn thinking!

Well, I'm not sure about unselectability but the other things you can do.
03-12-2007, 10:18 PM#15
Rykon
Ok... I've tried doing what a lot of replies say and they don't work...
and due to the fact that I'm a total newb with triggers I have no idea what-so-ever of how to create some of the variables and actions in WE that you posted Pyro