How do I merge or combine two sprites?

Get help using Construct 2

Post » Sat Sep 06, 2014 8:56 pm

Hi, a bit more advanced problem for you guys ;)

Is there any way to combine two sprite-images to one and save/spawn that as a replacement?
(Similarly to the great "canvas"-plug-in "paste object to canvas", but the canvas should be (or turn to) a sprite here.)

The idea is to save object-count by destroying pinned objects after combining them with the parent object (to one sprite, instead of two).

That could be really useful for all of us, I guess...

Any ideas?
B
8
S
3
Posts: 197
Reputation: 1,207

Post » Sun Sep 07, 2014 12:25 am

I don't think what you're looking for is possible at least the way you're explaining it. You can link and chain multiple sprites/objects together easily. They will move and work in tandem if you want them to, however they will still be registered as individual objects on the screen regardless if they are parented or not.
And as far as making 2 sprites into 1 is technically possible, it would be 1 image meaning, if the individual sprites had to do there own animation it would be much more difficult to animate any of the pieces if it was just 1 image. That is usually why things like player characters are made up of multiple linked objects like, arms, legs, and head to be individually worked with for later animation. However, if a character is made up of 6 objects (head,arms,torso,legs) just because the arms, legs, and head are parented to the torso doesn't inherently make it 1 object.
B
13
S
2
G
1
Posts: 47
Reputation: 1,211

Post » Mon Sep 08, 2014 12:52 pm

It would be something, like a face-generator: after putting together the pieces the face should be just one object (no separate animations needed), to keep my object count low.
It is be possible to code an image generator e.g. with the canvas-plug in to combine/bake together more layers or objects by inserting them to the canvas and saving the canvas (layer) to an image file. Also it must be possible to read that back and use it as a sprite. That would be one very uncomfortable solution for this problem, but that's about what I need. Just as instant as possible and without saving/opening files and so on.
B
8
S
3
Posts: 197
Reputation: 1,207

Post » Mon Jun 08, 2015 8:47 pm

ryanhagz wrote:as far as making 2 sprites into 1 is technically possible


How? :!:
B
9
S
1
Posts: 12
Reputation: 509


Return to How do I....?

Who is online

Users browsing this forum: Euduardo, Kin, mikehive, ratboy3, tinhofiel and 35 guests