Random objects going invisible

Get help using Construct 2

Post » Sun Sep 08, 2013 5:49 pm

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.Eliyahna2013-09-08 17:50:39
B
18
S
2
Posts: 61
Reputation: 902

Post » Mon Sep 09, 2013 6:48 pm

@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?
B
38
S
12
G
1
Posts: 526
Reputation: 4,085

Post » Wed Sep 11, 2013 5:47 pm

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.
B
18
S
2
Posts: 61
Reputation: 902

Post » Wed Sep 11, 2013 5:49 pm

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.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Sep 11, 2013 6:23 pm

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"Eliyahna2013-09-11 18:26:00
B
18
S
2
Posts: 61
Reputation: 902

Post » Wed Sep 11, 2013 7:07 pm

@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.
B
38
S
12
G
1
Posts: 526
Reputation: 4,085

Post » Wed Sep 11, 2013 8:30 pm

If only we could find some way to reliably reproduce the issue. It happens in node-webkit for me, same for you?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Sep 11, 2013 9:00 pm

@sqiddster - same. Do you have any code that affects the objects? I have a couple for some objects, and I've tried cutting them and repasting them. I haven't tested extensively but so far I haven't encountered the issue yet. I thought maybe it was time-based too, so I left the game on for 15 minutes or so but still to no avail.
B
38
S
12
G
1
Posts: 526
Reputation: 4,085

Previous

Return to How do I....?

Who is online

Users browsing this forum: ksiads, MathewHarrison, mtnboy22 and 2 guests