I was watching Jayborino's latest recording of Narudek's campaign. It includes boss like units in macro type mission. Gets me to thinking that huge armies can take out a boss really fast.
So I was wondering if you can limit the amount of damage a boss unit takes within a period of time. Like say I only want a boss to be able to take 100 damage in a second, and any additional damage is shrugged off. I know you can use behaviors with clamps to limit the damage from an individual attack (like hardened shields), but I'm not aware of being able to limit damage over a duration of time.
No, the easiest way to do it would be to use the "Change Unit Damage" trigger, which you can use to specify how much damage a unit takes or deals. You can choose between none, minimal, full and mega for both options, I think. The specifications for each is given within the trigger description. For your example, you would need the following: "Make Boss1 take minimal damage."
Yea, I was thinking it might have to be a trigger solution with that action. Maybe have a global real that records the units damage taken and resets to 0 every second and turns damage to normal when it does. Then have it take minimal or no damage when the variable goes above 100. I imagine it'll be slightly complicated but doable.
I think you could also do it in data, but the response time would be a bit of an issue:
Choose an arbitrary update frequency/time interval
Give the unit shield points equal to the amount of damage you want to allow during this time interval
Apply a Damage Response that prevents all damage to HP, but not shields
Pulsing with the chosen frequency, use Modify Unit effects to transfer HP into shields until the latter are full (+/-1 point with a 0 duration Persistent and "ShieldsNotFull" validator should work)
Use validators to kill all of the above setup once the unit reaches 1HP
Based on the chosen update frequency this will either be a very visible "pulse" as the shields regen every second, or massively punish burst fire as the equivalent HP value for 1/16 second would be 16 times lower. Think of a dozen Tanks/Tempests all firing at once, then having to reload for 3s.
Misc. pointers: Shield healthbars can be disabled, as can the Protoss dome visuals if you look at Kerrigan's "Wild Mutation" ability. Damage responses don't stack well, so this probably won't be reliable if the boss has innate "retaliation" effects or such. Balancing this against "proper" play will be a nightmare, since technically standing there and letting the units fire will be more effective than stutter-step micro and such. Should also work using energy as the health reserve, or even as the "shields" if you can redirect the damage taken somehow.
let's say the unit has 1000 hp. you want to limit the damage to 100 hp per second. have a buff on the unit that checks every 0.5 seconds if the shield is 0, if so add another buff that blocks any dmg otherwise remove the blocking buff.
if shields are two times > 0 then restore shields. count with a buff.
So I was wondering if you can limit the amount of damage a boss unit takes within a period of time.
I made this function for my ai with triggers. I did it so if unit took too much damage in last 2 seconds it goes back or request heal. You can't do it with data properly. You need to create updating array that will store all damage.
Look in this map how it works.
The idea is when unit take damage i add it to the custom value. Also i got a thread that reads this custom value every 0.0625 seconds and transfer the sum (all damage taken during this 0.0625 sec) in appropriate array member. So for tracking last 3 seconds i need 3 x 16 = 48 array members. The array updating every 0.0625 seconds and works like stack. To get all damage i just request the sum of the array.
I was watching Jayborino's latest recording of Narudek's campaign. It includes boss like units in macro type mission. Gets me to thinking that huge armies can take out a boss really fast.
So I was wondering if you can limit the amount of damage a boss unit takes within a period of time. Like say I only want a boss to be able to take 100 damage in a second, and any additional damage is shrugged off. I know you can use behaviors with clamps to limit the damage from an individual attack (like hardened shields), but I'm not aware of being able to limit damage over a duration of time.
that's called shields
No, the easiest way to do it would be to use the "Change Unit Damage" trigger, which you can use to specify how much damage a unit takes or deals. You can choose between none, minimal, full and mega for both options, I think. The specifications for each is given within the trigger description. For your example, you would need the following: "Make Boss1 take minimal damage."
@EivindL: Go
Yea, I was thinking it might have to be a trigger solution with that action. Maybe have a global real that records the units damage taken and resets to 0 every second and turns damage to normal when it does. Then have it take minimal or no damage when the variable goes above 100. I imagine it'll be slightly complicated but doable.
I think you could also do it in data, but the response time would be a bit of an issue:
Based on the chosen update frequency this will either be a very visible "pulse" as the shields regen every second, or massively punish burst fire as the equivalent HP value for 1/16 second would be 16 times lower. Think of a dozen Tanks/Tempests all firing at once, then having to reload for 3s.
Misc. pointers: Shield healthbars can be disabled, as can the Protoss dome visuals if you look at Kerrigan's "Wild Mutation" ability. Damage responses don't stack well, so this probably won't be reliable if the boss has innate "retaliation" effects or such. Balancing this against "proper" play will be a nightmare, since technically standing there and letting the units fire will be more effective than stutter-step micro and such. Should also work using energy as the health reserve, or even as the "shields" if you can redirect the damage taken somehow.
let's say the unit has 1000 hp. you want to limit the damage to 100 hp per second. have a buff on the unit that checks every 0.5 seconds if the shield is 0, if so add another buff that blocks any dmg otherwise remove the blocking buff.
if shields are two times > 0 then restore shields. count with a buff.
you just need to deal shield AND hp damage
Very interesting data ideas. I'll have to let them sink in and think about them.
I made this function for my ai with triggers. I did it so if unit took too much damage in last 2 seconds it goes back or request heal. You can't do it with data properly. You need to create updating array that will store all damage.
Look in this map how it works.
The idea is when unit take damage i add it to the custom value. Also i got a thread that reads this custom value every 0.0625 seconds and transfer the sum (all damage taken during this 0.0625 sec) in appropriate array member. So for tracking last 3 seconds i need 3 x 16 = 48 array members. The array updating every 0.0625 seconds and works like stack. To get all damage i just request the sum of the array.