Issue with hovering and mouse button activating an object

I want an object to activate when you press the mouse button down and hover over it, but not when you hover over it after you already have the mouse button down. Also, “activate when you release the mouse button” is kind of awkward is cases where a digital button is pressed.

Hello there if you want to create a click event for an object in conditions you can try

the cursor/touch is on <object>
touch or left mouse button is down
trigger once 

This should work for you

I want it to activate when the curser is over the object, then the mouse button is down, but not when you hold the mouse button while off of the object then hover over it with the mouse still held.

Although it seems odd the previous logic remains the same for your purpose
feel free to refer to this topic

Parent Condition:
If mouse over Button

Sub condition 1:
If mouse button down

Action 1:
Start/Reset timer “ClickTimer” on Button object

Sub Condition 2:
If mouse button released
If timer “ClickTimer” on Button < 0.250

Action 2:
[Do your button was clicked logic here]

How do I do:
“If timer “ClickTimer” on Button < 0.250”?

Click “add conditional” search for “timer” select “Value of Timer” it will ask you for an object, and timer name, and a value in seconds.

Also you should create an object group called “Buttons” and put all of your buttons objects in that group, and then change this logic to refer to the objects group instead of just “green button” and then the logic will apply to all of your buttons.

How do I group objects? I’m guessing it is different than tags.

Put those 3 conditions in this order:

  1. Mouse button or touch is pressed
  2. Trigger once
  3. Cursor is over object

http://wiki.compilgames.net/doku.php/gdevelop5/objects#organizing_objects_into_groups