Sprite order

For questions about using Classic.

Post » Thu Jan 13, 2011 1:39 am

I have two sprites, both on the same layer. On the first one, I sent it "To Back". I sent the second one "To Front". However, the first sprite is still being rendered on top of the second sprite.

Any thoughts on what I can do to fix this?
B
2
G
3
Posts: 20
Reputation: 890

Post » Thu Jan 13, 2011 8:46 am

not without a cap file :)
ImageImageImageImage
B
26
S
7
G
7
Posts: 572
Reputation: 6,097

Post » Fri Jan 14, 2011 12:48 am

Here you go. After simplifying my larger cap file down to the bare bones, it looks like the problem is caused by dynamically adding a new instance of the ShouldBeOnBottom object.

[url:2q10byyf]http://dl.dropbox.com/u/18659416/SpriteOrderProblem.cap[/url:2q10byyf]

FYI, this is the first time I've used Dropbox, so shout at me if it doesn't work.
B
2
G
3
Posts: 20
Reputation: 890

Post » Fri Jan 14, 2011 12:54 am

A newly created object will always be topmost on its layer. So when you create the ShouldBeOnBottom sprite, it'll automatically be in front of everything else on the layer it's created on. Just add a "Send to back" action right after you create the object.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Jan 14, 2011 1:53 am

Okay, that makes sense. Thanks.
B
2
G
3
Posts: 20
Reputation: 890


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests