lionz's Forum Posts

  • Nice one, I finished it

  • Hmm bit early not available for a year

  • On mouse clicked : platform behaviour simulate jump

  • If you are using an array then it's more usual to store the score in the array with it. You would need to get used to arrays, when you insert a name from the events I've seen it goes in at 0,0 so the score you would set at 0,1. You can use array sort to sort a Y so the second column with the scores. I prefer to do it a different way, run through each row until I find a score that is lower than mine then insert a new row and the score at that point.

  • Feel free to share the project file then we can see where the problem is that's all we can really do now. You'll have to explain what the current issue is.

  • Add a small wait before set item action and see if it saves correctly. If you have no other events for saving then can't see how it would go wrong.

  • Returning to your original question, in the second post you are clearing storage immediately after saving to it, that isn't going to do anything. On the first post it depends when you are saving and loading. We can't see the layouts or structure, probably it works if you perform save and load at the right times, maybe you are saving too early, hard to tell from just the screenshots.

  • Not sure on overwriting the first line, the events look fine to me except the bit where you set text on getting the local storage item isn't in a loop and it should be, like the other part where you set text using loopindex.

    Is the array always correct? Check the array in debug view when you set the text to see if it matches with the text. If they don't match and it's just a text display issue then it's not the worst bug ever but I couldn't work out why it would skip the first line of the array.

    As the original issue was to do with loading from the array, then make sure that set text is in a loop as mentioned and make sure the array is correct and as you expect on loading storage item.

  • You've not given any information though, please check out this post construct.net/en/forum/construct-3/how-do-i-8/best-help-tips-forum-139528

  • Do you mean overwriting the first line on the text object? The array is the important part so make sure that's correct. Share a screenshot of how the new events look. If you clear the text each time it should work.

  • I think the main problem is the bottom event is meant to be a sub event. It's ok to run that loop after you update the array but you have it running constantly on its own. Press S and add as a sub event so it runs after you updated the array and only once. Also I suggest setting the text of Name to "" to clear it before running the loop.

    It's confusing because I can't see where you've saved but if 'highscore' in local storage is just the name then you should run the loop again on the event where you get highscore and the array is loaded. The part where it runs on start of layout can be removed as this will not do anything it is using loopindex but not inside a loop plus the array hasn't loaded yet at that point.

  • There's actually a ton of confusing stuff going on here. From what I can see it looks like the array only contains a list of names not scores? You input a name and then push it to the array, where does the score come in? The save events are kind of important but you didn't share them, so what you are saving is a list of names? We can only guess.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Didn't quite get it, the 'go to layout' action didn't work for you? Are you trying to load a save game?

  • Music is loaded as you play it. For the sound effects you can disable the 'preload sounds' project property so they are not all loaded at the start of the game, then you can use the preload action to load the audio content you want. Later you can also unload it if for example you switch to that different environment and you no longer need that audio.

  • If you are referring to sprite creation why have you blurred out the important events? When you create an instance yes you need to wait until next tick for it to be available.