How to fire a event when a button is clicked ?
What im trying to accomplish is having my weapon switch by clicking/touching the button, i manage to accomplish it through keys but when trying a Event Dispatcher and Binding it wont work... im probably doing it wrong can somebody help me out. Thanks
Don't excactly get you, but have you tried to do it from edit > project settings > input > new action input?
answered May 14 '16 at 09:42 PM
If you are only trying to fire an event between 2 blueprints only, event dispatcher may not be your best solution because it's a competitively expensive operation. In that case an interface or even a direct communication with the blueprint may be best. Event dispatcher really shines best when you have multiple blueprints listening for the call.
However, for event dispatcher you need a reference to the blueprint that 'owns' the dispatcher. For example, if the ED is on your player controller and you are binding it on your weapon BP then on your weapon BP you need to get a reference to your custom player controller and plug it into the binds Target pin. Make sure the function/event that you bind to the ED call has the same signature as the ED call or it won't bind.
This is the best answer I can give with the information provided. If this doesn't help them please elaborate and possibly include screenshots.
If this did help please consider accepting the answer by clicking the check mark next to my answer. You'll know it's right when the answer turns green. Note: adding a comment after accepting an answer deselects it as accepted and will need to be accepted again. Thanks!
answered May 14 '16 at 10:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here