How do I make a sprite of a button look pressed on click?

Get help using Construct 2

Post » Mon Jun 26, 2017 5:38 pm

It's a bit more complicated than that. My game is where you press a button to go to the next layout, but I can't get the animation to play where the button changes to a sprite that looks pressed.

I've set it so that:
Code: Select all
On var = 11,
Make Button visible
Set text to "(Doesn't matter)
Set animation frame to 0


And after that, the thing that should actually make the button press:

Code: Select all
On button left clicked
Set animation frame to 1
Wait 0.5 seconds
Go to layout 2
B
10
S
1
Posts: 12
Reputation: 474

Post » Mon Jun 26, 2017 6:17 pm

If var is still 11 wouldn't it just be instantly changing it back to frame 0?
You might want to use a different test such as sprite visible then set to frame 0 or use a separate variable.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Mon Jun 26, 2017 6:39 pm

chrisinfinger wrote:If var is still 11 wouldn't it just be instantly changing it back to frame 0?
You might want to use a different test such as sprite visible then set to frame 0 or use a separate variable.


I never thought about that, thanks
B
10
S
1
Posts: 12
Reputation: 474


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests