x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Clicked/Pressed

What is the difference between "On clicked" and "On pressed" event?

P.S.: My game is a Android game

Product Version: UE 4.16
Tags:
more ▼

asked Sep 02 '17 at 07:46 PM in Blueprint Scripting

avatar image

ldragosl
8 1 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Jan 05 '19 at 10:57 PM

avatar image

BonecrusherOEF
16 1 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Onpressed is for mobile (touch) project event and onclicked is for desktop project event.

more ▼

answered May 07 '19 at 10:32 PM

avatar image

mozart360
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question