R85/86 layer related bug

Bugs will be moved here once resolved.

Post » Tue Apr 17, 2012 4:55 pm

Hi, I have encountered an annoying bug.
When I add a new layer(2) and put a
background on it, bullets' runtime z-orders change
on layer(1). And when I set layer(2)
parallax and scale rates to 0, bullets
become invisible and some random bullets
start shooting from outside the layout, even
tho they have a "destroy outside layout
behavior"
I can still shoot enemies with invisible
bullets and when I hit enemy with invisible
bullet, the bullet that shoots outside the
layout disappears. So It seems bullets are
where they should be but they are drawn
elsewhere.
Changing layer properties shouldn't
interfere with other layers right?
I noticed this bug while using r85 but it
preserves after updating to r86.

If you need capx files, I can send them later.Blue Hare2012-04-17 16:57:14
B
11
S
3
G
3
Posts: 17
Reputation: 2,677

Post » Tue Apr 17, 2012 6:08 pm

Please see how to report bugs - we need a .capx file to be able to investigate this. It's best to provide a new project created from scratch, because if you send us your entire game with something going wrong in it, it could be you set up your events wrong, and I'm afraid we won't investigate problems with events in the Bugs forum (it takes too much time).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Apr 18, 2012 4:46 pm

Right, lets add the essential things I forgot.

So, first everything should be fine.

When you set layer(0) to transparent and add new layer(2)and make it the lowest layer. At this point bullets runtime z orders change.
(you should make layer(2) have white background so you see things better).

When you set layer(2) parallax and scale rates to 0 bullets become invisible and so on (read the first post).


Problem occurs at least on opera and firefox. I tried r85 and r86, no difference. I'm running windows vista 32bit and I have the latest graphics drivers.

And here is the capx file: http://dl.dropbox.com/u/69516086/problem.capx
B
11
S
3
G
3
Posts: 17
Reputation: 2,677

Post » Wed Apr 18, 2012 6:51 pm

As far as I can tell there's no problem here, it's just your events are wrong.

If you say "Spawn bullet on layer 0" (providing a number to identify the layer), then add a new layer which you set to the bottom, that is now layer 0 (see the numbers to the right of the layers bar, those are the layer indices). If you give layer number 0 a different name, like "Layer 2", you will just confuse yourself - it's layer number 0!

Also note carefully each layer's transparent setting - you're putting a transparent layer beneath a non-transparent layer, which means you'll never be able to see the bottom layer.

Refer to layers by name instead of number and you'll always get the same layer no matter where you move it.

If you're still sure there's a bug, try making a new .capx from scratch. As it is it just looks like your project is set up wrong.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Apr 18, 2012 7:13 pm

So if you send another layer to the bottom it becomes new layer 0? I didn't know that... Guess I have been quite lucky since I haven't had any problems with layers before. Good that this thing became clear now so I don't encounter problems in the future.

It was quite confusing when it's like:

Object [-]
Layer [-]
Image point [-]

then I just will Layer[0] since I have a layer named layer0...

But yeah, thanks for you time.
B
11
S
3
G
3
Posts: 17
Reputation: 2,677


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests