Editing a variable from level blueprint

Hello, this is my second day with UE4 so im pretty much a noob :stuck_out_tongue: This is my question:

Im using the first person example project to play around with the engine. Inside the level blueprint there is a variable called hits. I want to reset the hits each time the player shoots. I could do that from the MyCharacter Blueprint but the problem is how to access the variable.

To give you a better understanding i want to set the variable to 0 after the last SET node.

I never work with the level blueprint so I can’t tell you how to access it.

But why don’t you store your variable somewhere else? It could be in the player pawn blueprint which can be accessed with “Get player Pawn > Cast to [Name of Blueprint] > Set [Name of variable]”.

Or you can store it inside of a blueprint which only exists once per level (like the gamemode blueprint or a self created actor which acts like a database). These can be accessed with “Get all actors of class > For each loop > Cast to [Name of blueprint] > Set [Name of variable]”.

In any case the variable must be marked as editable to be read by other actors which can be accomplished by simply clicking the eye symbol next to it.

+1 for suggesting new ways :slight_smile: But since this is my first project i want to keep it really simple without any extra bps

Great help! Thanks!!! :smiley: