Load image from URL does not listen to UID

Bugs will be moved here once resolved.

Post » Sun Mar 01, 2015 7:13 pm

Problem Description
Load image from URL does not listen to UID and changes every instance of that sprite.

Attach a Capx
download/file.php?mode=view&id=12774&sid=l8w4mjm5op9rb68mv7e1xf0xsy0nnwgg

Description of Capx
The capx shows the problem 100%.

Steps to Reproduce Bug
  • Create sprite
  • Load image from url
  • All sprites created change to that URL :(

Observed Result
I have no idea, can somebody give a work around?

Expected Result
Only the created instance loads the image from URL not all.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8.1

Construct 2 Version ID
Beta build R198
You do not have the required permissions to view the files attached to this post.
B
31
S
10
G
3
Posts: 310
Reputation: 6,046

Post » Sun Mar 01, 2015 8:03 pm

That is expected behavior from what I can tell.

Seeing as you change the sprite, all of its instances would change to that new sprite.

You would simply need another unique/cloned sprite for the second image. ie sprite2
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Mar 01, 2015 8:10 pm

lennaert wrote:That is expected behavior from what I can tell.

Seeing as you change the sprite, all of its instances would change to that new sprite.

You would simply need another unique/cloned sprite for the second image. ie sprite2


The only option C2 gives in runtime is "Create object" sadly i can't clone another sprite in runtime as sprite2.
And i want the player to load as many images as they want so i can't add sprites in edittime to use later.
B
31
S
10
G
3
Posts: 310
Reputation: 6,046

Post » Sun Mar 01, 2015 8:38 pm

Your right.
Hmm, the option says it wants to replace the current displaying animation frame.

Have you tried adding a blanc frame, show that animation frame, then replace ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Mar 01, 2015 8:47 pm

@stctr
Sprites share the same image across instances, so if you change one frame all other instances will change too.

You'll need to use another plugin to allow each instance to have a unique image. The paster plugin can do this, and I think tiledbg can as well.

There may be others. Here's where to go to find them:
c2-plugins-and-behaviors-list_t65170
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Sun Mar 01, 2015 9:48 pm

Thanks guys, paster plugin worked great. Still if it's possible to fix this issue it would be great.
B
31
S
10
G
3
Posts: 310
Reputation: 6,046

Post » Mon Mar 02, 2015 10:58 am

Closing as not a bug (instances share images to save memory).
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests