How do I fix this code?

0 favourites
  • 10 posts
From the Asset Store
Two levels with two sistem Wave. with Source-code (.c3p) + HTML5 Exported.
  • No seriously, what am I doing wrong, I feel like this should work to make it all loop until it finds a result but it's simply just not, it's just playing through once and Respin never becomes true.

    Tagged:

  • Hi Cameron, This may or may not work but looking at the top of your events I see you have on anim end OR is respin > Set ROdds and Set Respin to False. What might be happening is Construct is seeing this as if Respin is True set it to False right away which will make it always False. Try to add a wait 0.1 seconds right above your Set Respin to False. This should allow the ROdds event to happen before it sets Respin back to False. I am no expert by any means just scrolling through the forums trying to help.

  • If you are going to write events like this it's good to get used to debugging and logging. Add the Browser object to log the output and see if it's as expected.

  • Hi Cameron, This may or may not work but looking at the top of your events I see you have on anim end OR is respin > Set ROdds and Set Respin to False. What might be happening is Construct is seeing this as if Respin is True set it to False right away which will make it always False. Try to add a wait 0.1 seconds right above your Set Respin to False. This should allow the ROdds event to happen before it sets Respin back to False. I am no expert by any means just scrolling through the forums trying to help.

    This did not work, also even if it did I'd be scared of it having the chance of spawning multiple things.

  • If you are going to write events like this it's good to get used to debugging and logging. Add the Browser object to log the output and see if it's as expected.

    I normally would use the debug menu... but I can't view local variables in the debug menu.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...me suddenly realizing that it being local as apposed to global may be my issue...

  • So today I learned that local variables... don't function. No seriously, most of the time they just don't work, literally every problem I had was fixed by changing all of them into global variables.

  • Are they local variables in the screenshot? Also of course they work.

  • Are they local variables in the screenshot? Also of course they work.

    No like blatantly do not work, you can't change a boolian if it's a local variable. And even after changing that I had other issues until I also changed other things into global variables

  • Try to make local variables static so it is possible to see them in debugger.

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