Help With Pausing Animation

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • So I'm trying to make a pause menu for my slots game. So what I'm doing is, I made an event for a button click and it will trigger the layer 1 to get hidden and will then show layer 2 which is the pause menu. Now the problem I'm having, is if someone clicks the spin button and then goes to the pause menu, I'm having trouble resuming the active object animation when they resume to the same frame it was when the player clicked the pause button. I've tried all kinds of things including stopping the animation, writing the current frame to an array and then when they resume I would set the animation frame value to the current value in my array and then start/restore the animation. Didn't work, it just shows the first frame of the animation it doesn't even start.. I've tried stopping it and starting after resuming, but what happens is the frame is the same as it was before they paused, but it is stuck when resuming even though I have it set to start/ restore the frame. I tried a couple of other wacky ideas, but still have come up empty. Any suggestions on how to fix this or any alternatives to do what I'm trying to do would be great. Thanks!

  • Odd, it should work.
    Can you upload a file reproducing the issue?

    Simples way would be stop animation - start animation

    or:
    1) changing animation frame to (current animation frame of the object) --> changing animation frame "freezes" to the selected frame
    2) restore animation frame --> will restart the animation from the "freezed" frame

    a selection of my Fusion examples can be found Please login to see this link.

  • Well I totally changed my way of doing it to see if I could do it another way. I decided to get rid of the layers idea and put the pause menu onto a new frame. Now I've set up everything correct I think, but I guess not, because now my spin button doesn't work and I am clueless as to why. I've been sitting here for 15 minutes going over everything and it all seems correct. How do I upload a file for people. Also if I do that, isn't it really risky because someone could steal my game and then finish it up and publish it before I do?

    EDIT: Okay, I fixed my button not working. Had to delete the savegame and it worked. And now as I'm typing this I just realized that I probably am saving an array with the wrong file name. Yep, just checked and it was saving as savegame instead of savegame 3, which is what it supposed to be. And I just checked, it didn't solve my spinner problem. When I resume from pause screen, it is sitting on the correct frame, but it won't resume the animation.

    Edited once, last by mason1204 (September 30, 2016 at 10:49 PM).

  • ^ yes what amiman says, I was meaning that with "a file reproducing the issue" X)

    You can upload a file from going to "Go advanced" below, and clicking the attachment button
    (can't remember if you have to display a badge for that function, in case, click to community passport tab above, and register your product(s))
    you can also upload to online drives and link a reference here.

    Anyway, unless your game is in advanced stage, it's likely it won't be stealed, clickers here are fair guys ;)
    and there are already lots of examples online, searching the forum people can find loads of free-to-use content
    (btw I made one for a slot not so long ago, if you are interested you can Please login to see this link.)

    a selection of my Fusion examples can be found Please login to see this link.

  • Thanks for all the handy tips guys, but hating myself right now. I managed to fix the problem, but I could have fixed this forever ago in like 2 minutes. For my event start frame I had it setting all my animations to stop, because without it they would always go forever. I fixed it by adding another start of frame but global value W also has to equal 0 for it to make them stop. Glad I fixed it though! Thanks for all your advice! One thing I would like to know though, is how do I save an array to a file when someone clicks on the red X button that closes the window?

  • You could try saving it on "end of frame" (I don't know if that works, but it might)

    Or you could not give them a red X in the first place (by disabling that stuff in the application options), and provide your own in-game method to close the game

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I figured out how to do it on my own. A bit complicated for beginners, but I put a global array in each of my frames and then added an event that said if "close window has been selected" it will set global value V to 1. Then in my global events, I set up a event that if global value V is equal to 1, then it will write all the save data to the arrays and save the files to the disk, as well as saying "end of application." Hope this helps people out if they come across this down the road, wondering the same thing I was!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!