Load frame from file

For questions about using Classic.

Post » Fri Dec 30, 2011 2:37 am

I think I asked a similar question about this and forgot the answer, and can't find it in the forums so here it is, possibly again.

I'm using Create Object at runtime to create some sprites from the same object and using the Load Frame from file to set their picture. This sets teh same picture (the last one loaded) to all sprites. I'm sure this has to do with the fact that they're all instances (I remember this being the reason from my prior post anyway) but I forgot what to do about it. Do I just not use sprites and use a different object?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Fri Dec 30, 2011 5:47 pm

Try TiledBackground or lucid's Unique Sprite plugin:http://www.scirra.com/forum/pluginunique-spriteno-animuniqe-image-per-instance_topic43116.html
They both allow a different texture per instance.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Fri Dec 30, 2011 6:27 pm

Ah great, thanks. Is it possible to resize the tiled background texture? I want to use the images in a couple of places with different sizes and I'd rather not make copies just for that. If not I can try the Unique sprite plugin.

HMM seems like the image scale changes the image size but it seems unintuitive how I have to offset it. At 0 0 offset the image is off center regardless if I set hotspot and image point to 0, 0 or to the center of the image.

Edit: Ahh figured out to offset by the amount I'm resizing and it works good, thanks :)Juryiel2011-12-31 03:25:04
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests