Object Image

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

    Great Poster

    351 Posts


  • #2, by afrlmeMonday, 26. October 2015, 19:48 5 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

    6842 Posts

  • #3, by darren-beckettMonday, 26. October 2015, 22:29 5 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

    351 Posts

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

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

    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

    6842 Posts

Write post