Comparing Partial Gameplay Tags

I’m trying to compare partial gameplay tags with different parent tags.

For example, I have a projectile with the tags:

Damage.Projectile.Kinetic

And pawns have resistance tags like:

Resistance.Kinetic

When the projectile hits the pawn it passes the damage amount and the damage type tag. Can I take the damage-element (eg. Kinetic) from the damage type and compare it against “Resistance” tags to see if the pawn has “Resistance.Kinetic”?

I’m trying to avoid an “if damage is kinetic check for resistance kinetic else if damage is energy check for resistance energy else if…”

Hello there :wave:

What you could try is take your tag and split the strings using the “.” as delimiter.

Then you are able to compare them taking always the last index of the resulting array and e.g. use a “switch on String” or similar.

Hope that helps!

Greetings,
Markus
Bagpack Games