is currently confusing the **** out of me and I’ve been watching tutorials for weeks. As far as I can tell, there are multiple ways to communicate between blueprints:
Custom Events
Blueprint Interfaces
Event Dispatchers
I understand HOW to implement each…BUT I HAVE NO IDEA WHEN TO USE WHICH FORM OF COMMUNICATION!!!. Best practices concerning these would be awesome.
ALSO, on a somewhat related topic…how the HELL do I reference (get or set) a variable from one blueprint (blueprint A) in ANOTHER blueprint (blueprint B?) I keep getting “variable not in scope” messages…
Any insight / info here will earn you a gold star, my friends…
Hello,
Sorry to be obvious but you use them when you need them ^^
For example : If you hit an enemy with a projectile, you need to know enemy hp. In your enemy blueprint you set a variable “hp”. And you need to know the damage you did. Those informations can be in your weapon and your projectile.
Then on hit, your projectile check from your character your variable weapon damage modifier and use it to modify your projectile damage.
Then it checks hit target “hp” (your enemy blueprint) and set new “hp” : “hp” - “damage modified”. Then it set in enemy blueprint (the hit target) a variable “wounded” to true.
And in your enemy blueprint you have an event : wounded = true : play anim “wounded” and sound “arggg”
To reference another blueprint : create a variable then in the list selection type the name of the blueprint. Select it. You have your reference.
The documentation on blueprint communication does provide some examples of which method to use in certain situations, it does not go over every use case, but here are some examples: