How do I copy image of sprite to another sprite at runtime?

0 favourites
  • 5 posts
From the Asset Store
Antisuspend Plugin for Construct 3 prevents the runtime from getting suspended.
  • Hi all,

    can someone please help on that ?

    In my -let's say- game, I have a sprite called "a" and I have some other hidden sprites "b1", "b2", "b3"

    Sprite "a" is blank (white image) when game starts.

    The other 3 "b" sprites have from one different image each.

    How can I make it so that when I press a button, to load the image from sprite b1 or b2 or b3 to sprite a ?

    Is there some command like a.image = b1.image or maybe a.loadimagefromsprite(b) or anything similar ?

    Thank you.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think you only can do it with the screenshotting function, or easier, with the canvas or paster plugin. The key then is pasting the b1 b2 or b3 onto the canvas/paster and then use the image url of canvas/paster in the load from url expression of the sprite a.

  • I think you only can do it with the screenshotting function, or easier, with the canvas or paster plugin. The key then is pasting the b1 b2 or b3 onto the canvas/paster and then use the image url of canvas/paster in the load from url expression of the sprite a.

    Thank you for replying - but I would expect some more low-level way to copy an image from sprite to sprite.

    On the other hand I have searched all features and could not find something appropriate...

  • Can't you accomplish what you're trying by having "a" have a lot of animations? "Copying" frames is impossible (been using C2 since it came out), you can't dynamically change sprites' images, hotspots or collision boxes

  • You can use load image from URL, but then you have to load the images all from URLs I presume.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)