I'm trying to make an ability that creates a temporary shield around a unit that makes the targeted unit invulnerable to damage while the shield is up. (Think the old divine shield ability from wow, but cast on an allied unit instead of self).
I'd also like to make the ai-controlled unit that autocasts this ability whenever the player character, within a range of 6, drops below 50% health.
Any help making this ability and setting that casting function? Thanks in advance.
Take a good look at the immortal shield. In short, its an behavior that reduced damage while the immortal has a shield.
To be honest, I'm not sure if its possible to take damage without loosing stats (shield/eng/life). The best way i can figure would be to reduce the damage taken to 1 and then with a behavior "combat response" heal the unit with 1 hp every time damage is taken. Try setting the "modify fraction" to 0 in Combat: Damage response in a behavior. Not sure if it reduce the damage to 0 or just 1, if it does it to 0 then there you have it :D
You can then just make an ability that apply the behavior to the unit. I recommend adding a cool actor to make the divine shield visible, maybe some kind of bubble and tint it light-orange :)
That's a good idea on the shield, which I'll look into as soon as I've got the chance.
Any ideas on how I can make a neutral computer-controlled unit cast the spell whenever the target unit drops from above 50% health to below 50% health?
I'm trying to make an ability that creates a temporary shield around a unit that makes the targeted unit invulnerable to damage while the shield is up. (Think the old divine shield ability from wow, but cast on an allied unit instead of self).
I'd also like to make the ai-controlled unit that autocasts this ability whenever the player character, within a range of 6, drops below 50% health.
Any help making this ability and setting that casting function? Thanks in advance.
Take a good look at the immortal shield. In short, its an behavior that reduced damage while the immortal has a shield.
To be honest, I'm not sure if its possible to take damage without loosing stats (shield/eng/life). The best way i can figure would be to reduce the damage taken to 1 and then with a behavior "combat response" heal the unit with 1 hp every time damage is taken. Try setting the "modify fraction" to 0 in Combat: Damage response in a behavior. Not sure if it reduce the damage to 0 or just 1, if it does it to 0 then there you have it :D
You can then just make an ability that apply the behavior to the unit. I recommend adding a cool actor to make the divine shield visible, maybe some kind of bubble and tint it light-orange :)
@Sherlia: Go
That's a good idea on the shield, which I'll look into as soon as I've got the chance.
Any ideas on how I can make a neutral computer-controlled unit cast the spell whenever the target unit drops from above 50% health to below 50% health?
@johnfloyd: Go
Was able to make this work with a combo of data and triggers :-D
@johnfloyd: Go Copy Guardian Shield from the Sentry and set the Behavior to flag to invulnerable.
Field Sentry - Hallucation (Basic) Behavior: Suppress Invulnerability Disabled
Enable this to receive 0 damage.
Autocast properties would be located on the "Ability"
Set the "Autocast Validators" to
Caster LT50%
Enemy Near by - with a radius set to 6.