Screenshot and Save

Started by Atelier, Mon 30/11/2009 13:32:28

Previous topic - Next topic

Atelier

I'm working on a one room game at the moment where the player can choose some decorations to place upon a Christmas tree. I have a couple of problems though:

- First off, I have a rough idea of how the decorations will be placed. At the bottom of the screen will be a tray with different varieties of baubles, which the player drags out of the box and places them upon the tree. But how can I code this?

- Secondly, after the player has clicked on the finish button, how do I screenshot their decorated tree and save it as a picture file. (In the game folder, but ideally on their desktop).

Thanks for any help in advance.

Matti

1. The forum search brings up several threads about drag and drop programming. You should take a look at these.

2. SaveScreenShot (string filename) is what you're looking for.

Khris

Or DynamicSprite.SaveToFile(), in case you want to crop the screenshot first.

Atelier

Thanks Matti and Muc! I haven't had a chance to try anything yet, but I read through some object dragging and dropping threads so I think I know what needs to be done now. I'll edit soon with details on whether it worked.

SMF spam blocked by CleanTalk