What is the difference between "On clicked" and "On pressed" event?
P.S.: My game is a Android game
asked Sep 02 '17 at 07:46 PM in Blueprint Scripting
I believe the on clicked is a simple mouse click event, while on pressed is when the button is held down (no matter how long) and the on released is when the mouse button is released. For an example, an on clicked event would fire a single bit of code but an on pressed event could loop the code until the on released function is called. Of course you have to be careful with repeating loops. To put it another way, you could have a single click on a shop inventory to buy a single item, on pressed would add 1 to the amount to purchase, check if the button is still being pressed, and then repeat the addition. Then your on released could be used to ensure that the function stopped, which if you code it properly, might not even be necessary. But you could use the on released to call another button to confirm the purchase. Maybe convoluted, but I believe that is correct.
answered Jan 05 '19 at 10:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here