Kinila's Forum Posts

  • 3 posts
  • Never mind on my other post I just got what I was looking for. What you posted lucid did help with the saving the layout number/name but you left out what one thing that I just figured out. For you to actually load the layout properly without errors is to set the event:

    <img src="http://i236.photobucket.com/albums/ff2/naiakoaa/savingload.png">

    thanks for the saving solution just took me a while to get the loading correct

    Edit: ok...it saves and loads layout but only one problem if there is another save point once saved then reenter the game it does load the layout but not the coordinates this might take a while to figure out why....

    Edit: ok im an ideot lmao i figured it out again and works lol upon the title screen i added a ContinueGame button and the variable for that is:

    <img src="http://i236.photobucket.com/albums/ff2/naiakoaa/titlescreenproperties.png">

    Then set 2 new global variables:

    <img src="http://i236.photobucket.com/albums/ff2/naiakoaa/globalvariablessavefeature.png">

    then on the seperate event sheat named save function for my game i set the foolowing:

    <img src="http://i236.photobucket.com/albums/ff2/naiakoaa/savefunctionsetup.png">

    Now for a small explaination of what i did When player plays the game and save shooting the save box it saves their layoutnumber and name X and Y coordinates into a file named save.sav at the same location the game is ran. when the player exits their game totake a break the game stays saved and when they return to the game they click the button at the title screen labled Continue Game immediatly when they click that the save file sets the coordinates in the global varialbes and then loads the layout number of where they left off at. Now since my game has multiple save points the player needs to be positioned where exactly they saved at this is where the global values come from Immediatly when they load layout the game checks the global values if it has numbers in it greater than 0 the player is set to those coordinates and then sets it back to 0 there was a loop in this so the Trigger Once feature fixed that.

    If anyone knows a much easyer and bit more organized way to set this up just let me know im up for suggestions

    Kinila

    (Naiakoa the Time Lost Gamer)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Lucid, the 's' plugin does have some difficulty but I am not affraid to move on from basic to more advance features and like to learn these experiences. All of which you explained made sense to me but when It came down to this:

    [quote:2bjj7ar2]

    so if you were on layout one and

    set global('example') to layoutnumber + 4

    global('example') would equal 5

    wouldn't that set the global from layout 1 to a number equal to layout 5? how would a variable of this load the save file to set the player from layout 1 to where he saved his game?

    I am not even sure if I made a example good enough but here is another screenshot with those layoutname/number in the code with a example.

    Sorry if I am not getting what you said just started using Construct 2 days ago.

    Also the Event Sheets as you see there are about 9 of them. Reason for this is that it makes it easyer to recreate a fresh more organized Layout event sheets that has a linked and similar setup for the player, saveing, moving, death etc and if theres a glitch or bug in those variables it makes it similar fixing the glitch in the game if I edit 1 linked event sheet instead of multiple ones.

    But later on for the save feature for the title screen event sheet ill set it so that if player shoots (or clicks) a sprite it loads game file 1 or 2 depending on how this game goes in the future.

    Kinila

    (Naiakoa the Time Lost Gamer)

  • Just a quick question is there a way to save the Layout number/name so that when you load the save file from one layout and sets the players position in different layout like for instance the player saves their game on the 5th layout and exits the game then 3 minutes later they decide to continue where they left off so they load the game and at the title screen on layout 1 they load that very same save file and they are placed on the very same layout same player position aswell. Is this possible to do this? The only possible I got was this but only saves the players position if they are in the same layout section but when you try to load the save file it wont put you on the same layout number only the coordinates:

  • 3 posts