dop2000's Forum Posts

  • I don't think you need an array here. If there are only 4 frames, then it's very easy:

    For each Sprite order by random(1) -> Sprite set frame to loopindex
    

    If there are more than 4 frames in the animation, you can use the Advanced Random object.

    AdvancedRandom create permutation table with size Sprite.animationFrameCount
    Sprite set frame to AdvancedRandom.permutation(self.IID)
    
  • You can't use "Get" action without checking if the item exists first. Here is how to fix your code:

  • You can right-click the project name in the Project bar -> Tools -> View used addons, to make sure. If you really removed all references of it from the project, then you can safely uninstall it.

  • Ok, please email me what you can. I can't promise you I'll find the issue, but it will be a lot more useful than the guessing work with screenshots.

  • Where and how often do you call the Salvar function? What is the parent event for the "LocalStorage check item exist" action? How often is it called? What happens when the item doesn't exist?

    It would be a lot easier if you could email me the project file. Debugging by screenshots is very unproductive.

  • For me, what doesn't make sense is that the game works perfectly in the tests and when exporting it has this type of problem when saving.

    No, this happens often and I've seen it many times in other people's projects! For example: you save something in Local Storage and immediately switch to another layout. On start of that other layout you read the same data from Local Storage. This may work in preview, but will fail in an exported game or on a slightly slower PC, because LS operations are asynchronous. The write request may not be completed before the read request, and the data in LS may become overwritten with default values.

    That's why I'm asking you to share the complete screenshots of all relevant events, or a project file.

  • I assume you are asking about a 2D array?

    Text set text to str(Array.at(xIndex, yIndex))

    On Enter pressed: Array set value at XY (xIndex, yIndex) to (Array.at(xIndex, yIndex)+1)

  • "Paste" is now an asynchronous action, so you can use "Wait for previous action to complete" instead of "Wait 0.1s" - it would be more reliable.

  • It doesn't make sense. Local Storage should work with all export options. Also, NWjs export is deprecated, it will be removed soon.

    I suggest you test the game on different hardware, especially on some old and slow laptop, to make sure that it still works.

  • It's not possible to help you when you are posting only small screenshots of the code. I need to see the entire picture. Can you share your project file? Or email it to me: doperst2006(at)gmail.com

  • So sure it's that useful? Doesn't appear to be a substitute for the JSON plugin.

    It's not a substitute. This allows to store short JSONs directly in the code, without having to load them from files with AJAX. I'm using this trick all the time.

  • I don't know if this is what you needed, thanks for trying to help, in the game tests it worked perfectly, but after exporting it doesn't work

    This almost certainly means that you are not using Local Storage correctly. LocalStorage operations are asynchronous, so when you are testing locally on a fast PC they may work, but after exporting the delay is slightly longer and everything breaks.

    Please show the code where you load the data from local storage.

  • You do not have permission to view this post

  • Like I said, you can't just manually edit dictionary values. It's only done with the code. Right-click the dictionary in the list of objects and select "Find all references" to find all events where it can be populated.

    It's possible that the game loads the values from a file. Check the Files folder in the project.

    Is there a way that I can download the information in Debug mode?

    It's not possible. But you can add an event that exports the dictionary, for example:

    Keyboard On "D" key pressed : Dictionary Download
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads