global Variables?

Can you cast/share the value of a boolean variable over different blueprints.

for example: i want to have a boolean that says whether the player has an item or not and i wan’t to use the value from that variable in a different blueprint.

Thanks,
Alasdair

Yes, you can use ‘direct communication’

Or you can just put the variable somewhere else, like the game instance, they everything can see it.

But, a heads up for later, for good programming, only the player should know when the player has a variable set or not…

Yes, but you need a reference to that other object (blueprint instance) to read the variable from.

Note: Blueprints are classes, and the Actors (and other objects) created from those Blueprints are instances (objects.) This is an important distinction – you never actually run “the blueprint,” you run “some actor created from a blueprint.”

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.