Random objects going invisible

0 favourites
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I'm not sure if this is a bug, and if it is I cannot, for the life of me, figure out how to reproduce it.

    Randomly when I'm playing my game, "something" will happen that sets off a sequence of strange random events. Most notably random sprites will set themselves invisible (some of these objects don't even have a single line of code to them). Sometimes items that should be destroyed at the end of the animation aren't.

    I know it sounds like a code issue, but I've checked all the areas that effect visibility and object destruction and nothing seems to tie together. Whenever this happens, it's never the same objects every time, either.

    I know this information isn't helpful at all, but has anyone experienced any weird issues lately? I want to say it's since r143 but I can't be sure.

  • Do you have a capx, or an exported version of your game so we can see this issue in real time?

    If you just want to know if others have had this Issue: I haven't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I haven't

  • Oh no! What happened to my robot?

  • Do they set themselves invisible,or maybe move outside of the view, scale to nonexistant or have empty animation frame?

  • Or maybe the last animation frame has the origin point offset by a lot, causing that frame to by offscreen...

  • LittleStain - The capx is too large, but I will be releasing a demo hopefully within a few days here.

    - They set themselves invisible. I know this because a couple of the objects are enemies that shoot other objects based on image points, and the enemies are still shooting objects at the correct location while being invisible (and also take damage).

    Paradox - Also, if this were the case, it would be happening everytime.

    Thanks for the responses guys - I'm incredibly confused. Half the time I test my game everything is fine and dandy.

  • I know this sounds weird... but sometimes I move the lines within the block of code and then move them back, then save. When the system saves it seems to "rewrite" the messed up coding to the correct code shown again. (although the code appeared correct in the first place but it didn't act like it was written)

    I've had to do this in various areas before. Also, if something "breaks" unexpectedly and there is no apparent reason why I open the backup (you can set the system to do one daily) and I paste whatever code I've added since to that copy and it will work just fine. I know it sounds weird!

  • Eliyahna - would you see the rewritten code, though? As in something I can find if I were to sift through my code again? I'll have to check, but that still doesn't explain things disappearing that don't even have codes to them.

  • No the code looks fine to begin with, it just doesn't work. There will be nothing wrong with the way it's written. So I change it then change it back (in order for the system to allow a save for that area of coding) then save and it looks the same still... but it works now.

    It's almost as if, even though it was written correctly, it just never saved in correctly or became corrupted.

  • Eliyahna - this is what I'm afraid of. Stupid question; if I were to cut every part of the code and re-paste it into itself, do you think it would fix the issue? I'm getting close to being able to put the demo online, so at the very least I can have you guys play test it.

    In the very worst case scenario, will I need to start a new project and copy/paste everything from the corrupt project to the new one?

  • Just change whichever section of code it is, then undo and save.

    I would go into preferences and set up a daily backup to your hard drive and to a private dropbox folder. This way, if something "breaks" you can go back to your working model that's only a few steps behind and then copy and paste item by item the new code to it. Sometimes, you'll find you had a mistake. Other times, it will be a mystery why it works now and wouldn't before. But at least you always have 2 copies of the last working version from yesterday. I set mine up to backup once per day. It will do it automatically when you save once per day. It doesn't take more than a couple of seconds and it can save you many hours of recoding.

  • I'd like to say that this happens for me too! it's very weird and I can't reliably replicate it. Sprites just randomly start to disappear - the debugger says they are still there, visible, and opacity 100.

    Very weird.

  • If your sprites are on a layer that has parallax set to zero, you have to either anchor them or pin them to something.

    I also had a case once where I set a layer to invisible... then I called that same event sheet to another layout forgetting that command would follow. You can make commands to layers be level specific. Like "system show layer 2 invisible, if global-level=4"

  • sqiddster - I'm so glad I'm not the only one having this issue!!

    Eliyahna - the thing is that it's completely random and I'm almost sure it's unrelated to a code error. Each time it happened, something different was affected. Once I release the demo, if there are still issues I might just have to recreate the whole project by copy/pasting everything. Not fun.

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