Download

Hud button and character function

Hello guys. I have made a touch button that prints “hello” when I touch it. I used http://voxagon.blogspot.co.uk/2014/07/ue4-basic-button-setup.html?m=1 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

Hello,
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: : https://docs.unrealengine.com/latest/INT/
which list ue4 docs wwiki forums and answerhub related search. It helps a lot.

you’ll find an example here https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Blueprints_HUD/1_1/index.html 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.