Hud button and character function

Hello guys. I have made a touch button that prints “hello” when I touch it. I used UE4 - Basic Button & Setup to do it. It works fine on my phone.

Now how do I make this button to trigger the attack function on my character? In the character BP I have a setup when I press attack button(left mouse), my character shoots projectile. How do I make Hud BP talk to my character BP and make it use the attack?

Just realised this might be wrong section of the forum. Sorry

yes maybe you would have post it in blueprint section to have a faster reply but we learn everyday ^^

you need an interface to communicate from hud to player. There are some videos and tutorials you can find on youtube and in this forum. Check too
edit : i forgot to link :stuck_out_tongue: : Unreal Engine 4 Documentation | Unreal Engine Documentation
which list ue4 docs wwiki forums and answerhub related search. It helps a lot.

you’ll find an example here 1.1 - HUD Example | Unreal Engine Documentation which is related to the hud blueprint in the blueprint content example from the market place.

Thanks I’ll try
Edit: thanks for the links!!!

Hey Pabooklas, I’m glad you found my tutorial useful. I’m actually currently working on a tutorial for HUD to Scene Interaction that with also include a more versatile button system. It does build on my RTS Style Camera Movement but the method of communicating from HUD to Player is the same concept.

I will be covering cast to and blueprint interfaces as the main ways of communicating. I’m hoping to get it finished in the next day or so. If you cant wait though look into BPI’s and Cast To nodes.