anyone have some ideas on this...

Get help using Construct 2

Post » Wed Jan 21, 2015 5:02 pm

I would like to on left button clicked capture what ever is in a certain area as if i were taking a picture... so say I have a 150x150 pixel square attached to my mouse position and when I mouse click if there is anything in that area of view it would capture a picture of it... send it somewhere so I can view it in game after.... possible?

Edit 1 - would be nice if when you click the left mouse button and are over the pink square or slightly over it whatever part of that pink square is inside the viewfinder it like snaps a picture of it...possible

Edit 2 - I'm looking at the https://www.scirra.com/manual/125/system-actions snapshot canvas and curious even after reading the manual on it.. where do these snapshots get stored? how do I access them after taking one?
You do not have the required permissions to view the files attached to this post.
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 5:37 pm

Ok so I got it working where as I can move the camera around and get a snapshot of the canvas exported to the bottom half the screen - now I need to figure out a way to JUST capture the center viewport of the image rather than snapshot of the entire screen.... any ideas?
You do not have the required permissions to view the files attached to this post.
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 5:44 pm

If you are not against that, the paster plugin might be perfect for you:

basically a paster is a rectangle where you "snapshot" a part of the layout, then you just display it.

plugin-paster_t88750
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Jan 21, 2015 5:58 pm

says its for r160 does that matter that were on r195 now?

Edit : how you install plugins I created a new folder in exporters->html5->plugins and pasted the file downloaded fromy our link but it failed to load given an error
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 7:34 pm

That means that the plugin needs to be updated to account for changes in the Construct client between r160 and r195.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Jan 21, 2015 7:38 pm

ok and with that being said - is there another version or another plugin that would act the same way... I just wanting to take a canvas shot of a certain area only - NOT the whole screen and then save that image to later use
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 7:53 pm

The current version available there works perfectly with r195 - the one that's a .c2addon file. Just drag that file into an open C2 window and it will auto-install.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Wed Jan 21, 2015 8:08 pm

It's definitely something that should be added to the System object, something like "Snapshot canvas area", that triggers the same "On canvas snapshot" event.

Here's a rather hacky way to do it with ExecJS. Note that it only works with WebGL off.
You do not have the required permissions to view the files attached to this post.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Wed Jan 21, 2015 8:56 pm

lmao Magistross hacks it again... ok so is there anything I would normally be working with that would require WebGL be on??

Edit - Hey Magistross can you look at that file again for me and just tell me why when I add to 5&6 view_pot.Width - 5 and so forth that it don't scale the same as the outter one??

Edit 2 - Hmm I notice however that doing it this way I have no record of the previously captured images... the other system built function produces what I assumed was a reusable data link to the captured image... the idea here is to be able to store multiple screen captures for later use.... 1st image captures who in carrier, if another shot is taking carrier2 right beside carrier one ext.. and Magistross if you wouldn't mind checking your PM
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 9:27 pm

You can save the resulting data URI in a variable, instead of directly loading it in the sprite, then you'll have your "history" of snaps.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Next

Return to How do I....?

Who is online

Users browsing this forum: gskunk, tarek2 and 45 guests