Object Image

  • #1, by darren-beckettMonday, 26. October 2015, 19:01 9 years ago
    Is there a way to set an objects image at runtime to be the background image of the current scene?

    Great Poster

    384 Posts


  • #2, by afrlmeMonday, 26. October 2015, 19:48 9 years ago
    Just use objects. You can hide / show them with the set object opacity action part or you can assign conditions to them to control when they should be active / displayed.

    I'm not sure how the engine would react to updating background image sprite path / file during runtime as the engine calculates the scene height & width based on the height & width of the assigned background image. This also tells the engine whether or not the scene in scrollable.

    Imperator

    7285 Posts

  • #3, by darren-beckettMonday, 26. October 2015, 22:29 9 years ago
    I would not be changing the scene background, I want to set an object image to be the same as the scene background image.
    i.e.
    Set Object.Image = CurrentScene.BackgroundImage

    Great Poster

    384 Posts

  • #4, by afrlmeMonday, 26. October 2015, 22:36 9 years ago
    Why?

    Try...
    Objects["name"].ObjectSprite = game.CurrentScene.SceneSprite
    

    I have no idea whether or not it will actually work (not tested) & I'm not sure why you would need to do what you are doing.

    Imperator

    7285 Posts