Duplication of sprite sheets

Discussion and feedback on Construct 2

Post » Fri Dec 21, 2012 3:05 am

Maybe there is a better way to do this, but...

When I create multiple instances of the same object and then export it to HTML 5 it creates a separate sprite sheet graphic in the export even though all of those objects use the same sheet/images.

Of course I can create some objects dynamically and avoid this, but it seems to me that they should share the same sprite sheet resource automatically.

NOTE: I created the sprite sheet by loading multiple images into the objects sprite. Maybe that has something to do with it?
B
14
S
4
G
2
Posts: 25
Reputation: 2,625

Post » Fri Dec 21, 2012 1:43 pm

You are probably creating separate object types when really you want to create new instances of the same object type. See objects in the manual to learn more about the difference.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Dec 21, 2012 2:07 pm

That appears to be what it was. I wanted to make different functionality for each instance so I created separate object types. And in another case, I wanted to easily be able to change the object dynamically in "code" so having separate object types made that easier, but then duplicated the resources which I don't want to do.

Is there a way to have different object types share a sprite sheet so that it's not necessary to duplicate it. I could make a work around using instance variables to change functionality too I suppose.cangelodawg2012-12-21 14:10:13
B
14
S
4
G
2
Posts: 25
Reputation: 2,625

Post » Fri Dec 21, 2012 3:28 pm

I have the same problem.

i want to have a copy of a sprite, but i don't want to inherit any behaviours of the originals, and i don't want duplicate sprite sheets as my data directory is 10 times bigger than it should be with all the instances of the same prites.
B
41
S
11
G
4
Posts: 428
Reputation: 7,356


Return to Construct 2 General

Who is online

Users browsing this forum: Mirlas, radbrothers and 12 guests