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

  • 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" ...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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...

  • TheDom,

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

    Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)