The basic shields already do this to some extent. There's at least a "full sphere" graphic and a "local impact" one. If using regular shields you can split your damage effect up into multiple smaller ones and have each trigger a shield impact (think 20 marines vs mothership), you can adjust the "armor reduction" value accordingly and use a persistent effect to apply many damage effects simultaneously.
As for your actual question, if you're okay with having only a few different reactions, you can use damage responses on behaviors. There are fields to set the minimum and maximum damage thresholds to which the behavior responds. Then have your "shield" actor react to certain damage responses.
Directly converting damage taken into say, opacity, is impossible without triggers afaik.
You could use something like a behavior, similar to the Immortal's shield, which uses a damage response for higher damage values. Make the damage response not change anything, just trigger an actor with your more flashy shield graphics and apply the behavior to your units.
Thanks, now my issue is how do I scale the shield graphic to the appropriate size of each shielded unit? Is there an easy way to do this? Or is there some way for the shield actor to detect which effect it was struck by? That would be the most useful, as I have some effects which run 16 times a second and I want them to only have an opacity of .125 so the target doesn't glow like a lightbulb.
Are you using regular shields or a custom graphic that triggers on attacks?
Regular shields are attached to a spherical mesh set by the model, and can't be scaled ingame afaik.
Any other effects can use a Model type actor with the "auto scaling factor" field to adjust to unit sizes. You can link the model to an Attack actor via the AttackImpactModel field.
You can send actor events to other actors in the same scope. Thus you should be able to change the opacity, scaling, tint etc of the shields if you find a valid reference to it, which I don't know. Colossus and Medivac beams use such references, but I haven't tried it with shields yet.
If you're using damage response behaviors you can set a cooldown on the reaction, that should solve the lightbulb issue.
Wait, wouldn't that only track current life? Or can you compare "relative" vital values, thus measuring the rate of vitals loss?
Still, I think (s)he wants to classify "hard-hitting" attacks (siege tanks?) and "weaker" attacks (zerglings?) and display different visuals based on that, not necessarily taking into account the remaining shield reserves of the target.
I want to make a shield flash less for lower damage amounts (or certain effects). Anyone know how to do this?
The basic shields already do this to some extent. There's at least a "full sphere" graphic and a "local impact" one. If using regular shields you can split your damage effect up into multiple smaller ones and have each trigger a shield impact (think 20 marines vs mothership), you can adjust the "armor reduction" value accordingly and use a persistent effect to apply many damage effects simultaneously.
As for your actual question, if you're okay with having only a few different reactions, you can use damage responses on behaviors. There are fields to set the minimum and maximum damage thresholds to which the behavior responds. Then have your "shield" actor react to certain damage responses.
Directly converting damage taken into say, opacity, is impossible without triggers afaik.
You could use something like a behavior, similar to the Immortal's shield, which uses a damage response for higher damage values. Make the damage response not change anything, just trigger an actor with your more flashy shield graphics and apply the behavior to your units.
Thanks, now my issue is how do I scale the shield graphic to the appropriate size of each shielded unit? Is there an easy way to do this? Or is there some way for the shield actor to detect which effect it was struck by? That would be the most useful, as I have some effects which run 16 times a second and I want them to only have an opacity of .125 so the target doesn't glow like a lightbulb.
Are you using regular shields or a custom graphic that triggers on attacks?
Regular shields are attached to a spherical mesh set by the model, and can't be scaled ingame afaik.
Any other effects can use a Model type actor with the "auto scaling factor" field to adjust to unit sizes. You can link the model to an Attack actor via the AttackImpactModel field.
You can send actor events to other actors in the same scope. Thus you should be able to change the opacity, scaling, tint etc of the shields if you find a valid reference to it, which I don't know. Colossus and Medivac beams use such references, but I haven't tried it with shields yet.
If you're using damage response behaviors you can set a cooldown on the reaction, that should solve the lightbulb issue.
Just use a Validate Unit term in the actor events that uses a Unit Compare Vital validator or two and do what Kueken531 said.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Wait, wouldn't that only track current life? Or can you compare "relative" vital values, thus measuring the rate of vitals loss?
Still, I think (s)he wants to classify "hard-hitting" attacks (siege tanks?) and "weaker" attacks (zerglings?) and display different visuals based on that, not necessarily taking into account the remaining shield reserves of the target.
Delta only compares current vs max not damage over time, there is no function for that sadly.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I figured. Sadly the data editor sucks at basic arithmetics.
@SkeletalHammer: Go
You can set your damage response behaviors to exclude whichever effects you want. This can be used for your fast period damage effects.