How to get variables from Tagged Actor
So basically in my game, there is going to be a lot of different monsters, and a lot of different bullet projectiles coming at the player. I want to check if the actor that hit the player has the projectile tag, and then pull the variable of BulletDamage from that actor to replace where the Damage variable is at the moment. How would I go about doing that as I do not want to cast to every single type of bullet in the game.
asked Apr 25 '17 at 03:02 AM in Blueprint Scripting
You don't need to cast to every bullet type individually. Instead, make a parent blueprint with bullet type, damage, mesh, etc.. variables, then make as many child blueprints as you'd like.
Doing that, you can just cast to the parent and still access the child data. You also wouldn't even need to check a tag, since if the actor is NOT a child of the bullet parent, the cast will fail. It's its own check :)
answered Apr 25 '17 at 03:47 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here