For Each Ordered (0.95)

Post your own tutorials, guides and demos.

Post » Mon May 19, 2008 1:24 am

Quick demo of the new For Each Object (Ordered) condition in 0.95.

Like For Each, it allows you to iterate instances of objects one-by-one, but using an expression to determine the order. In this example, it's used to sort Z orders by Y co-ordinate, which you can notice by dragging the butterly sprites around.

The event used is:
+ For each Sprite ordered by Sprite.Y Ascending
-> Sprite: Bring to front

This means it iterates the sprites from top-to-bottom, bringing each one to front. Since the bottom ones are brought to the front last, they are on top.
Scirra Founder
Posts: 25,198
Reputation: 200,337

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest