Can I use the same variable in all blueprints?

I’m creating an energy sistem and I need to be able to change the same variable in blueprints all over my game.
I’m kind of lost.

Hi RafaelLima,

It sounds to me as though Macro Libraries may be a route worth looking into. Here is the link to the documentation on it.

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/MacroLibrary/index.html

I hope this helps!

Adam

I’m reading about macro, and so far a understand that I can create function to reply in anyweare in my game, but I can’t create variables in macro.

Hi RafaelLima,

You could have one blueprint that is in charge of the variable, and then, using Blueprint-Communications, you could have other blueprints access and modify that variable.

Here’s one of our tutorial videos that went up in a recent blog post, explaining Blueprint-Communications and how to use them: - YouTube

Hopefully this helps!

Cheers - MikeB (Epic Games)

Hey, I resolved part with Macro and part with event dispacher,

Thanks a lot Adam

Not a problem, let us know if you run into more trouble!

Adam