I made a level editor but can only save one level

0 favourites
  • 2 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Hi, I'm Bill.

    I made a level editor following https://www.construct.net/en/tutorials/level-editor-construct-2280. So far it is functioning correctly. When I save the map it loads up just fine. When I go back into the editor I can edit the level and the changes are saved. I can not seem to figure out how to save a new level.

    Here are some of the things I have tried: I set a 'KeyRing' variable to get the KeyCount from the LocalStorage . When save is pressed it should add one to the 'KeyRing' and do LocalStorage.KeyAt(KeyRing). This did not add anything to the LocalStorage.

    Similarly I had it save as Key: "Level"&KeyRing. This seemed to work initially but could only save one level before it stopped functioning. This was not an improvement from my current situation.

    If you have any advice on how to save multiple unique levels into local storage, or a different save method, I would be very thankful to hear it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I after even more study, Im trying some things. I'm going to leave this up so people can see what solutions I'm trying.

    I have two things Im trying to do to fix my problem. First I got a string called 'LvLName' and had it update to whatever the TextInput had in it on 'SaveButton' pressed. Then I added a OnItem LvLName Set condition for Go To Layout LevelSelect.

    I think the first problem was caused by the KEY slot being unnamed. It should make a new slot available if string from new, or it will just update the save of that name.

    The second problem was likely that I was moving on before it was done.

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