arrays working differently in debug mode

  • Okay, this is a bit weird I think.

    I'm using an array to track quests in my game. Every time the quest gets updated, I use a function to append the text strings and then show that in a journal. All seemed to be working well, but I went to debug one of the function parameters to make sure I was happy with it, when I discovered that things act differently when running in debug mode.

    I thought it would be best to video this, with the game first being run in normal mode, then in debug mode, to demonstrate. You can see how the journal fills out in the first instance correctly, but when running the game in debug mode, it's clearing the cells. Not sure why this is happening, but I thought it was worth discussing. Tried it on multiple occasions, thinking that maybe I wasn't giving the array time to load in, but it happens like this everytime no matter what.

    What could be happening in C3 to make the debug mode act differently to the normal mode?

    Guess I should point out that this isn't really a problem for me atm, as it only happens when I try to fill the wrong cell in the array. Still, I found it interesting.

    youtu.be/M-zCr72VtMQ

  • moving the 'on start -> load array' function to the system event sheet (where the function is also kept) fixed this.

    Originally had the function call in my debugging event sheet as I plan to do all this at startup once I get that far.

    So it was easy to fix, but I'm still not 100% sure why it only became an issue in debug mode

  • How do you fill this array? Do you load data with AJAX? If you are not using AJAX requests correctly, a slightly longer loading time (which may happen in debug mode) may cause this issue.

    Can you post a screenshot of your events?

  • yup

  • You are running two AJAX requests in parallel, maybe when one request is completed, it triggers "Wait for previous action" in both functions.. Try combining these two functions into one, I think it should fix the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, that makes it all work in debug mode the same as normal mode.

    Not sure why the other way only works in normal mode but I'll just avoid it from now on.

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