Hi, I would like to press the pause button, have everything stop, but the buttons animate in. Then when I press unpause, have the buttons animate out. I Have this working fine, but one of those buttons is a sound button and when I press it, it will not animate out with the other buttons. My buttons are animated images, so I have been using timescale along with animation speeds to get this far. I cannot simply just use a 2 frame image and swap between frames because I have an animated On button and Off button. Here is my set up.
All animations are set to 30 fps.
When Pause is true > set timescale to 0
When Pause is Not true > set timescale to 1
When Pause is true > set btnSoundOn timescale to 1
When Pause is Not true > set btnSoundOn timescale to 1
When btnSound is on frame 9 > set timescale to 0 (to stop it)
When btnSound is on frame 17 > set timescale to 0 and set frame to 0 (to loop it)
When btnSoundOn is touched > Destroy btnSounOn
When btnSoundOn is touched > Create btnSounOff and set it's timescale to 0 and set to frame 9 (frame 9 is where the animation reveals the full button)
When btnSoundOff is touched > Destroy btnSounOff
When btnSoundOff is touched > Create btnSounOn and set it's timescale to 0 and set to frame 9
This is where everything gets messed up. Everything animates fine without touching any extra buttons and when I do touch the SoundOn button, it swaps out to the SoundOff button. However, after that it will not animate off like everything else even though it has the same code as all the other buttons. It animated off if I hit pause again, which is wrong because it animated off while the other buttons animate back in.
TLDR: I want to create an on/off function that is animated at the pause screen. I cannot just swap between 2 frames because my button movement is part of the animation I created in each button. Is there a better way to do this? Maybe using the 2 frame swap idea, but animating the position in Construct2 instead of in the button's animation?