Is it possible to screenshot/capture a portion of the canvas?

Theoretically I want to capture/screenshot over an object slot, save it in the players save file and use it for the game.

I’m trying to create a random character generator, and want to use the image of the characters but without creating the objects over and over. I noticed the screenshot option under actions but it gives you a path option only. Not sure how to go about it.

Do I need real javascript?

Edit: Appears this is difficult/not really a thing in javascript, ignore pls.

Forget the screenshot, that won’t do.

When you save a character, store the ID of each element that constitutes it. Then in the game, load the sprite with matching IDs.
Of course, your in-game sprite needs to be “decomposed” in the same way as the character generator (not just one image, but several images pinned to each other).

Good luck with it.

1 Like