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.
https://dl.dropbox.com/u/108799982/SaveLayoutArray.capx
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Thu Oct 04, 2012 6:08 pm

I've changed your example

https://dl.dropbox.com/u/90589590/Load%20reworked.capx

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
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
27
S
7
G
4
Posts: 314
Reputation: 4,928


Return to How do I....?

Who is online

Users browsing this forum: Braus, RickUSBstick, Yura G, zenox98 and 21 guests