[?] How do I combine multiple images to make one image

0 favourites
  • 2 posts
From the Asset Store
500 monsters and creatures images for card games - Set 1
  • Odd question, I am using Construct 2 to make a tool for a game so that it can generate a player character spriteset.

    Meaning I am trying to make it so that when a player chooses the correct body parts and presses 'Okay', it then uses variables (that are saved on one body part) to find and combine multiple files.

    What I am trying to accomplish is relatively easy, I just don't know if I should execute Javascript to do it, or how else I would do it.

    Example! Right now there are two objects: Body, and Hair.

    Body has two instance variables, Body, and Hair. Body saves as Body_p01 (where 02 is part 1), Hair has Hair_p01.

    When I click Submit I want it to combine Body_p01 with Hair_p01 and save it as one png.

    Thanks for any help with this, I am trying to make a useful tool for another community as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:30n3707h]Snapshot canvas

    Take a screenshot of the current display. This triggers On canvas snapshot when the snapshot is ready, and the resulting image can be accessed with the CanvasSnapshot system expression. This can then be loaded in to a sprite or tiled background, sent to a server, or opened with the Browser object in a new tab.

    [quote:30n3707h]Invoke download

    Invoke a URL as a file download in the browser. Even if this points to a web page or document, it will be downloaded as a file in the browser interface. The URL can point to any address on the Internet, or it can be the name of any imported project file, or it can be a data URL (useful for downloading canvas snapshots). The filename parameter allows you to choose the filename the browser gives to the download, which can be different to the name of the resource being downloaded.

    You would probably want load the sprites into your layout, position them together, resize the window, then snapshot and invoke download.

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