Save Frame Position ruins Frame

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.
  • I decided to add a simple checkpoint system to my level. When you touch the checkpoint, it saves the frame position and deactivates. If you die and the checkpoint has been reached, it loads the frame position instead of resetting the frame.
    But when it does this, a ton of completely baffling things go wrong:
    -The score is copied and pasted into a layer below it.
    -You can no longer shoot, but jumping still works.
    -Ending the level results in an error.
    -Some randomly chosen cannon traps designed to launch missiles every 2 seconds appear to have missiles stuck inside them, and there's an endless cacophony of explosion sound effects. Different cannons are affected each time, and sometimes none are affected at all.

    Any suggestions?

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

  • array is the way to go for sure. atleast you've got less chance of striking any weird bugs.
    but if you can reproduce them in a small example file, and sumbit for CT to look at, then they may be able to fix any bugs that do exsist.

  • I would appreciate a copy of your game with informations on what does not work. With objects, what are the events concerned etc.

    Francois
    PM: Please login to see this link.

  • Sorry I took so long to reply to all you guys! I had started a response a few days ago that got lost before I finished it, and haven't remembered to write another one until now. Hopefully someone is still willing to help. :)

    So, about using an Array. I've never really used Arrays before, but I'm not sure how easy it would be to save all the important progress the player has made on a level. I can see how I could use one to store things like the player's position, score, and health, and in fact that was something like my original plan. The problem was coming up with a way to store which coins the player has collected so far, as they play a very important role in the game. Forcing the player to re-collect all of them after every death seemed a little harsh( though I might do that as a last resort if I can't get this to work), and allowing the player to keep every coin they collect before and after the checkpoint would allow them to get dangerously-placed coins without needing to survive the hazards.
    Hmm... now that I think about it, would it be enough to just record the fixed value of every coin you collect, then destroy the coins with those fixed values every time the checkpoint resets the level? I wonder if that would work...

    And I would be happy to try to reproduce this problem on something small enough to fit in a file to upload. It'll take some time, though.

    Thanks for your advice everyone!

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

  • You'll have to store the values of every coin in the game if you want to track which specific coins the user already collected. What you could do is spread value throughout the coins and use that to track the specific instances of coins. Player collects coin 1, set Array Value 1 to 1 (or whatever number you want). Start of Frame, Array Value 1 = 1, destroy coin 1, and so on. You can use a fastloop to loop through the array to make it a lot easier. Hope that makes sense.

Participate now!

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