Problem with Pause using Load/Save state

0 favourites
  • 4 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • Hello there!

    I found myself in a little trouble here;

    I'm making a pause system, that basically saves a state, takes a screenshot, then goes to another layout (pause) and loads the screenshot into an empty sprite using the 'Load image from URL' using the URI of the canvas screenshot. Here's the event sheet I made for an example:

    <img src="" border="0">

    I know most of you will say "Use System, Set time scale:0" but in my case, it's far from ideal, since I'm using a lot of fx via WebGL, like Noise, and if I just freeze the time scale, the fx keeps running.

    Well, this system I show you in the screenshot, actually works, and works pretty well except for two things: When I go to the Pause Layout, you can see the previous image loaded and the new one replaced, making a small jump. I can live with that, but if someone knows how to fix it, it would be great.

    My mayor issue, is the buttons. In my game, I have a family of buttons, and two events that controls how they behave; if cursor is over them, switch to frame 1, if not switch to frame 0.

    For some reason I still can't figure, once you 'resume' (load from state) it breaks it. I replicated here in the .capx without families so if you have a free version you can still use it.

    I think I saved it using the last beta, if you don't have it, let me know and I can downgrade from C2 to the stable one and re-export it.

    Thanks! I hope some can help me :) I'm banging my head quite hard on this one.

    Pause with Load-Save problem

  • lukedirago

    I think this is a bug and you should post it in the bug section. I had a similar problem with the mouse cursor after loading a saved game.

  • spongehammer I was hoping it was something with the logic of events.

    I'll post it as a bug, thanks

    But anyway;

    • Anyone now how to fix that small 'jump' of image when it goes to the other layout?
    • Anyone that comes to a different approach to make the same effect in the buttons with the cursor is over?


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, it is indeed a bug. I already reported it.

    As for my case, I solved with this workaround:

    I made a sprite, which follows the mouse position and when the buttons overlays the sprite, it changes the animation frame. Now this works independently if I load or save, so we could say 'problem solved' except that it required a couple of steps to work around it.

    <img src="" border="0" />

    The frame keeps skipping on loading from URI, I'll try to fix it later, but if someone knows a way to fix it, it would be aweeeesome.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)