HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making A Unit Invulnerable To Only One Team

06-30-2004, 02:50 AM#1
perrry
Is it possible to make a creep/unit invulnerable to only one team and be able to switch which team it is invulnerable based on triggers.

Yes? No? If yes, how do I go about this?
06-30-2004, 05:15 AM#2
WyrWuulfe
Quote:
Originally Posted by perrry
Is it possible to make a creep/unit invulnerable to only one team and be able to switch which team it is invulnerable based on triggers.

Yes? No? If yes, how do I go about this?

You might be able to use a trigger that uses an event to determine who is currently attacking a given unit and sets (in)vulnerability as the situation requires.
06-30-2004, 06:18 AM#3
WyrWuulfe
Quote:
Originally Posted by WyrWuulfe
You might be able to use a trigger that uses an event to determine who is currently attacking a given unit and sets (in)vulnerability as the situation requires.

Sorry, dude, it appears I spoke too soon. As near as I can tell after experimenting a bit, once a unit is set invulnerable the system simply refuses to let anybody target it for an attack. The only other possibilty I can think of would require a trigger to be able to intercept an issued order and abort said order if certain conditions exist and then perform an alternate set of tasks. I'm not certain if this can be done either.

This is an interesting challenge. I'm going to continue working on it.
06-30-2004, 07:42 AM#4
Xinlitik
This is a rather messy solution, but you could set the unit type of the unit to "ancient" (I'm relatively sure that I saw a function that did that...), and in the object editor make all units of the enemy team unable to hit Ancients. (In their targets enabled area check "Non-Ancient". Of course, this'll only work if your map has different units for the different teams.