How do I take a picture in-game and then use it?

0 favourites
  • 2 posts
From the Asset Store
15 main themes, 15 in-game loops and 26 music stingers for casual games.
  • Hello,

    I'm fairly new to construct (just finished the tutorial yesterday) and I would like to know f there is a way to take a picture as part of the game and then use it as an asset in the next section of the game.

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using vanilla Construct 2 (as in without plugins etc) I do this using CanvasSnapshot. Add the action 'Snapshot canvas', which is found in 'System'. You then need to use the corresponding condition, which is 'On canvas snapshot' (also found under 'System' to collect the image. At this pint the image is stored in the expression 'CanvasSnapshot'. You can store this data in a sprite, tilemap, or tiled background by using the action 'Set frame from URL' and entering 'CanvasSnapshot' as the URL.

    Beware using this alongside save/load, as the image will be lost. Store the expression 'CanvasSnapshot' into a variable on the sprite, and have the sprite update its frame from the URL provided in the variable when the game loads.

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