Sprite Strip Placement

Get help using Construct 2

Post » Mon Mar 18, 2013 6:34 am

Hey everyone,
Today I am working on a sort of level select layout. I have created sprites for levels 1 through 20. To keep the number of objects to a minimum, I have put them all into a single animated sprite sheet.

How would I go about placing this sprite at x,y on frame 1... a,b on frame 2... etc etc?
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Mon Mar 18, 2013 7:15 am

You could have 'level' instance variable in your sprite, which defines which level it is. Then create an event:

at start of layout
for each sprite
.. set animation frame to sprite.level

This assumes all the frames are in correct order, so frame for level 5 is fifth and so forth :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Mon Mar 18, 2013 9:30 am

That would work but I am not looking for that effect. Let me try to draw it out below.

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20

I want the one sprite to duplicate itself and show each separate frame. If not then I will just place 20 sprites, no biggy.
B
50
S
14
G
12
Posts: 813
Reputation: 16,764


Return to How do I....?

Who is online

Users browsing this forum: Braus, Yura G and 16 guests