dop2000's Forum Posts

  • It does exactly what it says - loads game state from the file you selected in "Open dialog".

    • Post link icon

    This is great news!

    There is still one thing I believe web version can't do - preview in NWJS mode. Will this be added before retiring the desktop app?

    And also, is there any way to override/disable Chrome keyboard shortcuts? I've closed Construct at least a hundred times by pressing Ctrl-F4 or Ctrl-W, it's the main reason I'm using Desktop build...

  • Well, you are doing it again :) You disabled the Save/Load system and the error message went away. Great, but why stop at this and ask for a solution on the forum? Why not try to find what's causing this error yourself? You already know how to do it - add debug messages to all events which you think are involved, run the project in debug mode, open console, press the button, see what's happening, try to figure out the sequence of events and soon you will wind the fix. Troubleshoot! Nobody can do this better than you because nobody knows the project as well as you do. (I'm almost sure it's something to do with Undo flags not properly set or cleared)

    About JSON - you don't need to understand its structure to use it. JSON (from saved state) is just a string of data, containing information about all objects in your project. When you load from JSON, all objects are recreated from that data, that's it.

  • I'm guessing that message is from your Saving/Loading system or from Undo. It probably has nothing to do with loading an image into sprite. Or maybe you are using "Sprite Set from JSON" instead of "Load image from url".

    I'm just encouraging you to experiment and try solving problems yourself, instead of posting here about every little issue you encounter. You'll learn much quicker.

  • You already know how to load an image into a sprite, and you already know how to paste sprite onto a canvas. Why do you need help with this?

  • Press F12 in preview, open console and see if there are any error messages.

  • You can't send the sprite to another layout. What you can do it "tell" that other layout to create the sprite when it starts. For example, with a global variable CreateSpriteAtImagePoint. On start of layout check this variable and create the sprite if it's set.

    Or you can set the sprite as global, it will appear on another layout automatically, but you'll still need to update its position.

  • Well, if you are saying your buttons work correctly, it's good :)

  • Noah. Not for one of them, but for all of them. So you can do things like "Object destroy" without "For each" and it will work fine. But in some other situations you might need "For each" loop to process instances one by one.

  • I think you forgot the attachment.. If you resend it, I'll check it tomorrow, it's the middle of the night here where I live.

  • I can take a look at your project if you don't want to share it here, maybe I'll see something that you missed. My email is doperst2006 (at) gmail.com

  • try this:

  • You definitely don't need "Pick all" in event 17. Try removing this condition (leave it empty) and add some browser log message to event 17, above the loop. Will it show up in console log?

    There must be an explanation, but it's hard to speculate without seeing your project. Maybe the whole group gets deactivated by some other event (like "Token on created"). Can you reproduce this issue in a small project and share it?

  • Like I said, you need to disable the Undo system completely and test saving feature. If it works correctly without the Undo, then you will know where to look for the problem.

    And of course, if you are not calling "SaveStep" function, then undo won't work.

    .

    Try clicking anywhere on an empty space, hold the mouse button, move cursor to your sprite button and release. It will work as if the button was clicked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why on earth did you put "Set isUndoSave=true" into event 148 again? This flag should only be set inside the "SaveStep" function! If you are setting this flag here and there in different events, this can easily be the cause of all your issues.

    .

    On a side note, why do you use "On left button released, Cursor is over button"? The problem with this event is that user can click somewhere else, move mouse cursor over the button and release. Why not simply use "On Object clicked" or "Button on clicked".