Simple Save Game Function

Get help using Construct 2

Post » Thu Oct 04, 2012 4:08 pm

SO I'm trying to create a simple save game function that will allow me to reload to a different point in my game if needs be. It will allow the player to load not only to a previous layout, but to load up the X and Y positions of the 3 characters at the time of the save.

I've included a simple .capx file so you can see what I'm trying to do. The controls are as follows :

Spacebar - Toggles between the three players
C - Jumps to the next layout
S - Saves Game
L - Loads Game

The problem I'm facing at the moment is that when I load up the save game file, it just resets the layout to how it is at the start, not taking into account the X and Y positions. If I disable the first command in the Load function, then it works, but doesn't allow me to load up a different layout.

Sorry for the long description, and thanks for any help you can give me.
Using R248 for all examples
Posts: 382
Reputation: 9,742

Post » Thu Oct 04, 2012 6:08 pm

I've changed your example

Basically, you need to do the positioning when the layout starts. I use a global variable to check if it's a load and not just a normal layout start.OddConfection2012-10-04 18:09:45
Find all the Construct 2 games that were on Steam Greenlight here
Posts: 501
Reputation: 7,129

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests