If you’re not sure how to add variable to a blueprint, I think the first step would be to go watch a few tutorial to get the hang of it.
If you’ve never touched UE4 / blueprints, the Unreal has great tutorial series too that I’d recommend watching
Here’s one made by someone(aka not unreal) that seems to teach how to handle mouse click and touch events. It’s probably with a previous version of the engine but it still will get you some insight.
Cheers,