Screenshot Object

New releases and general discussions.

Post » Tue Dec 08, 2009 4:18 pm

Yeah, I know, this has already been asked in the past. I just want to know how it's going.
Is there already a way to take screenshots and save them in a Construct-made game?
If yes, where is it? I do need it! :-D

Kan
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Tue Dec 08, 2009 4:37 pm

I believe you can use a canvas object, have it grab the layout, then send it to the image manipulator, which can save it as a file.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Tue Dec 08, 2009 7:26 pm

Well, I don't find how to do that with the Canvas Object. How do I grab the layout, and then send it to the Image Manipulator?
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Tue Dec 08, 2009 7:37 pm

I don't think the canvas object is an option at the moment, it seems to be broken right now. But if you want to try it, just put the canvas object in it's own layer, make the layer invisible. Then when you want to take a screenshot, have the layer appear and the canvas grab the screen behind it. I think that's how it's done.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Tue Dec 08, 2009 8:29 pm

The canvas object does have some bugs, but I tried it in one of my .caps and it worked.

Put the canvas on the top layer
Make sure it's always in front of everything
In the properties, set it to grab the layout before drawing
On event, imagemanipulator, copy from sprite: canvas
Then imagemanipulator, save to file
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Tue Dec 08, 2009 10:11 pm

Okay, I [think I] did all that but it saves only a white image.
How can you know an object is on a layer and not on another?
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Wed Dec 09, 2009 4:34 pm

You can either drag it to the correct layer, or use the move to layer action at runtime.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Dec 09, 2009 5:13 pm

Well, I tried all that and there's no way to take a picture! The Canvas is on the top layer, and I have an action where ImageManipulator copy from the sprite Canvas. I tried all :
- to make the top layer invisible then maing it visible when I want to screenshot
- to make the top layer invisible all the time
- to make the top layer visible all the time
- to make the Canvas opacity 0%

It always result to a whole black or a whole white .bmp file.
Here's the link to download my .cap file : http://butor.com/resource.do?uid=1260395646020
Thanks if you have time to check it and tell me what I made wrong.

Kan
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Wed Dec 09, 2009 11:11 pm

Looks like it's not working because of the bugs mentioned before. I'm not sure why it worked in my .cap and not yours - I couldn't get it to work with a new .cap either. Sorry, but it looks like there isn't any way to take a screenshot until those bugs get fixed.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Dec 09, 2009 11:16 pm

I just made a .cap that took a series of sequential screenshots (16 in a row) and no matter what I did, the first shot was always plain white.

That might explain why you're getting a plain white file. Maybe you could "prime" the canvas ahead of time, like have it paste a worthless object on start of layout and then discard it. I dunno, it's worth a shot.

Or maybe the canvas is just a tick behind when saving the image with Image Manipulator or something...? Further testing is needed on this to pinpoint the bug, I think.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests