I’m using a custom object as a button for the ui of my game and I wanna make it so that when I press on the button it slightly shrinks and when I release it, it expands back to normal. I’m trying to use the button states extension but I can’t find a condition for when I release the press pls help
There’s a little toggle when setting the ‘button pressed’ condition. Switching that toggle will set the reverse of the condition.
So like, set up a ‘button pressed’ condition but switch that toggle so it checks for if the button is not pressed.
But make sure to add a variable or trigger once so that it doesn’t check the condition continuously.
You do not have to invert the pressed state to catch the release. Use the built-in condition for the left mouse button being released while the cursor is still over the button; that condition already runs once per release. On scene start, store the button’s original X and Y scale in object variables, shrink to about 0.92 of those values while the button is held, then write the stored scale back on release. Also scale back if the cursor leaves the button before the click ends, or it stays small after a cancelled press.