How do I transfer pictures

Get help using Construct 2

Post » Tue Dec 20, 2016 4:49 pm

I've been working on an educational activity on phylogenetics (tree of life). There is one question in which students drag and drop pictures of dinos into their appropriate place on a pre-drawn tree. I want to be able to basically do a canvas snapshot of the completed tree and transfer it to another layer. Is it possible to do this? I've tried to think of if there is an alternative way for them to do the question, but I'm stumped. I don't know if I explained it well, but basically I want to be able to have students drop pictures on to the pre-drawn tree and have a snapshot of that tree only (not the whole layer) transferred to a different layer.
Posts: 16
Reputation: 384

Post » Tue Dec 20, 2016 9:10 pm

Yes, this is possible.
You will use the system action "Canvas snapshot" for this.

There is one inevitable downside though:
snapshots take a short time to be done.
This doesn't take more than some ticks, but you may have some frames rendered before the snapshot is done.

To take the snapshot in your case, you would want to do the following steps:
  • hide the layers that you don't want to be visible on the snapshot
  • Take a snapshot with the system action snapshot canvas
  • Add an event "On Canvas snapshot"
  • Now, you can load a Sprite's image from the URL "System.CanvasSnapshot"

Of course, you will have to add a Sprite first.
You would make that Sprite as big as the layer you want the screenshot displayed on.
Make sure to put it on the appropriate layer.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
Posts: 528
Reputation: 7,091

Return to How do I....?

Who is online

Users browsing this forum: bluesun66 and 3 guests