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
56
S
15
G
13
Posts: 826
Reputation: 17,645

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
9
G
7
Posts: 756
Reputation: 7,302

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
56
S
15
G
13
Posts: 826
Reputation: 17,645


Return to How do I....?

Who is online

Users browsing this forum: nahima, SysDiman and 7 guests