How I do the animation of play and pause button?

Get help using Construct 2

Post » Sun Dec 25, 2016 11:44 am

Hi,
I have created the pause button in game and use the timescale event,
that work nicely, but i want to change the play and pause icon . can any one help me to resolve the issue?
B
38
S
9
G
1
Posts: 73
Reputation: 2,658

Post » Sun Dec 25, 2016 12:29 pm

Put both icons into a frame under the same sprite. Ie. double click your play icon and open editor then look for small long window beside editor (usually below) with small play icon and then right-click in that window and choose "add new frame", right click the empty frame and navigate to your pause icon and add it as frame 2.
Now you will just need to use the action "change frame" in your events whenever you want one or the other.

You could also have one "spawn" the other sprite at its location and use hide action on other.. or have them both always present and use hide/unhide as needed.

My point is there are several ways to do what I think you are asking. Personally, I like using frames for things like this.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Sun Dec 25, 2016 4:05 pm

Thanks for the help, I already use the above options, first time if we click on icon, it's change to "play" but after that it will not convert to "pause".
can you please tell me the event how to write?
B
38
S
9
G
1
Posts: 73
Reputation: 2,658

Post » Mon Dec 26, 2016 11:56 am

radhaw use global variable if pause then Globalpause = 1
if not set to 0
B
249
S
39
G
15
Posts: 1,952
Reputation: 40,579

Post » Tue Dec 27, 2016 3:30 am

Thanks! Sir :)
B
38
S
9
G
1
Posts: 73
Reputation: 2,658


Post » Thu Feb 02, 2017 9:13 am

The pause button not work properly means after clicked pause button the background not stop animating and game objects also moved form the screen.. And then game stopped Please help.....
B
38
S
9
G
1
Posts: 73
Reputation: 2,658

Post » Thu Feb 02, 2017 10:27 am

radhaw make family group and when paused set family animation to stop and when you unpause set it play or add one layout with message saying game paused goto that layout there are many other ways is well but this is simple easy
B
249
S
39
G
15
Posts: 1,952
Reputation: 40,579

Post » Thu Feb 02, 2017 12:37 pm

Thanks for the reply Sir, I will try this and let you know.
B
38
S
9
G
1
Posts: 73
Reputation: 2,658

Post » Thu Feb 02, 2017 7:15 pm

I have tried as you suggested but still players is moving.
I am using the action for player Every tick-"Self. x -10". so it should be stop when we click the pause button.
Last edited by radhaw on Fri Feb 03, 2017 3:11 am, edited 1 time in total.
B
38
S
9
G
1
Posts: 73
Reputation: 2,658

Next

Return to How do I....?

Who is online

Users browsing this forum: rayolf and 37 guests