I currently have a set of blueprints set up so that a player can absorb fire power which activates the ability to throw a fireball. This all works. You go up to Fire_Source, you press E, ‘Fire_Power is enabled’. Left clicking sends a fireball out to the location you are looking. When it hits something, the fireball projectile is destroyed and a small explosion goes off. Good stuff.
What I now need to do is, when the fireball hits something… I want it to talk to the thing it has hit. I want it to essentially say "If you are ‘Flammable’ … set on fire and then destroy’.
I want ‘Flammable’ to be a tag/attribute I can just throw on anything so that I can modularly apply it to anything and it will work. Is this possible?
I think the “Unreal Way” of doing what you want to do is not to use tags, but create a damage type (“flammable” or “combustible”), and then, when the object takes damage, you check the damage type, and if it’s one that should set it on fire, you trigger the particle system for the fire.
If you’re wondering how to make the object disappear by burning, that’s a more complex question and one I don’t have a good answer for. My first thought would be to create a material instance with a noise opacity mask that had input parameters so you could increased the noise’s filterWidth (thus increasing how much of the object is transparent), possibly animating the noise’s UVs somewhat to make it feel more “alive”.
If your object is a blueprint which I think it is, make an OnActorHit event and get the actor which hitted the object -> cast to BP_Fireball_Projectile -> Enable fire particles on object -> Wait 3secs -> Destroy self. I think it should work like this
Just to wrap up this thread, I forgot to reply… thanks for all the responses. I initially worked out a way to use tags literally as I described. I have in my fireball projectile BP an “On hit actor with tag (flammable)” -> Destroy hit actor. Whilst this works, it isn’t at all customisable on a per actor basis so while I’ve kept it in for testing reasons I have also gone with the damage type. I’m not fully sure the ins and outs, but the way I’ve done it is make a DamageType called “Fire Damage”. Made a float with the value of 1 (should I use a bool?). Then when a projectile hits something it deals 100 Fire Damage and then I can reference that in any BP I want and have whatever .