How do I load an image to use a background during game

Get help using Construct 2

Post » Sat May 10, 2014 7:54 am

Hello,
an included Construct sample game "Taking Screenshots" lets me save screenshots. That is awesome!

How could I import a picture and use it as a background while the game is already running?

I am trying to build an app which can open user pictures and set them as the background, then drag assets freely on screen and save a new screenshot of it all to the users system.

Thank you,

V

P.S. I just found out about "Users Media" ...
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sat May 10, 2014 6:23 pm

Create a global variable called URL, set it to text, and leave the value blank

Global text URL = ""

Create a blank sprite (fill it with anything, color, etc...) I'll call it "Picture" for this example.

I don't know what conditions you want to use but, it's the events portion that matters here.

System> On start of layout > System > Set URL to "http://www.whatever.com/your_image.png"

System> On start of layout > Picture> Load image from URL (keep current size) or set to (resize to image size)

You'll be using sprite instead of the background object and you can change the condition to anything you want.

Hope this example helps...
Last edited by TheDom on Sun May 11, 2014 2:13 am, edited 1 time in total.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293

Post » Sun May 11, 2014 2:08 am

TheDom,

I will give that a try as soon as i finish the thing I'm working on right now.

Thank you! :)
B
14
S
4
Posts: 190
Reputation: 1,735


Return to How do I....?

Who is online

Users browsing this forum: John Cutter and 7 guests