Problem with Pause using Load/Save state

Get help using Construct 2

Post » Sat Aug 24, 2013 5:33 am

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:



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
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Sat Aug 24, 2013 9:39 am

@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.
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Sat Aug 24, 2013 5:28 pm

@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?

Thankslukedirago2013-08-24 17:28:39
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Sat Aug 24, 2013 8:17 pm

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.



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.
B
15
S
6
G
3
Posts: 35
Reputation: 3,982


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], diamantico21, ratboy3, TRMG and 29 guests