Forum rules - please read before posting.

How to change the camera background via AC Action?

edited January 2018 in Technical Q&A
Hi,
I can't figure out how to change the camera background via an AC Action.

I'd like to create a very simple 2D game that has changing background images based on game progress. No animated player, just dialogue based game play.
i.e.: Player has dialogue options to click on and the background changes to a new image which is like a scene change. New dialogue option and then new background etc.

So, just one 2D camera with changing backgrounds depending on the game progress.
Seems simple, but I haven't figured that out yet.

Anyone know how to do this?

Thanks,
Kay

Comments

  • Use animations - attach an Animator to the background, then create a different animation for each background, where the background sprite is changed each time.

    You can then control which animation is played using the Object: Animate, and save its state using the Remember Animator component.
  • edited January 2018
    Thanks Chris.
    Before I had seen your reply, I had started by adding the backgrounds as sprites to the scene.
    Then I toggled visibility for the currently visible sprite OFF and for the new sprite ON.

    This seems to work pretty well, except that I haven't figured out how to store the currently visible sprites object name so that I can turn OFF visibility for it in a simple AC actionlist that has parameters for the currently visible sprite (to turn that one OFF) and for the next sprite backdrop that should be visible.
     The second part is no problem, since I can preset the next sprites object name when I call that actionlist.
    But how can I reference the previous (or current) sprite to turn visibility OFF?

    As far as your suggestion is concerned; when you are referring to "background" - this is just a dummy object to attach an animator to? Not sure what you mean by that.

    Thanks as always Chris!
    Kay
  • edited January 2018
    Hi Chris,
    I figured out your suggestion. This works very well - thanks!

    It's crazy how many different game styles you can accomplish with AC! :)

    Regards,
    Kay
  • For the benefit of anyone stumbling upon this thread in the future: the visibility of a sprite can be saved with the "Remember Visibility" component, and by "background" I meant the background sprite, not a dummy object.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.