I currently have a Pawn blueprint which contains a ‘Damage’ variable, I want to be able to set that variable whenever the Pawn collides with certain other blueprints. (Fire, Water, etc).
I’ve read a few tutorials to do with Blueprints and Interfaces but just can’t seem to get it to work.
You could make that variable public and allow the modification of it from anywhere.
You could create a function which is doing that. (I would suggest this).
Now on the events “event on begin overlap” or “event hit” you get the actor which is colliding. Cast that one to your character pawn (Just go in the context menu and search for “cast to”) and then use the result of that to call that function or get/set that variable.
Whether it be in the level blueprint or a class BP of the fire or water, just type get player character, drag a wire and type cast…cast to your player BP. Drag a wire from the blue output and type the bool variable in the player BP you want to turn on. Set it. Turn it on. Tada.