Controlling a Background Animation

JeffreyDriver

  • Posts: 2262
Would it be possible using the code block to control a background animation by just displaying one frame instead of having it loop and switching to any particular frame?

NickamonPoppytail

  • *
  • Posts: 1119
I don’t think there is. For that you might have to create a new background and hide the other background layer using the “hide layer” block.
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH. One Million: Last-one-standing style small project. The Poppytales: Platformer boss rush with character collecting. Skies n' Fall: Boss rush shooter prequel to Rise n' Brawl. Precious: Weird platformer. Christmas Time 2: Sequel to Christmas Time 1.

JeffreyDriver

  • Posts: 2262
I'm hoping that it would be possible using custom code instead of using multiple backgrounds. Custom code allows you to do things that the built-in blocks don't, but I'm not familiar enough with haxe.

squeeb

  • Posts: 1617
Can you find the code for backgrounds? I may be able to piece it together.. you just tell it what frame to be on.. and maybe there is a loop bool we can set to false

NickamonPoppytail

  • *
  • Posts: 1119
Can you find the code for backgrounds? I may be able to piece it together.. you just tell it what frame to be on.. and maybe there is a loop bool we can set to false

Backgrounds can’t be coded as far as I know.
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH. One Million: Last-one-standing style small project. The Poppytales: Platformer boss rush with character collecting. Skies n' Fall: Boss rush shooter prequel to Rise n' Brawl. Precious: Weird platformer. Christmas Time 2: Sequel to Christmas Time 1.

JeffreyDriver

  • Posts: 2262
Can you find the code for backgrounds? I may be able to piece it together.. you just tell it what frame to be on.. and maybe there is a loop bool we can set to false

Backgrounds can’t be coded as far as I know.

I don't see why not. You should be able to code any aspect.

mpeterskc

  • Posts: 22
I ran into this a while ago and ended up using the "hide/show layer" block to control background animations. I'm not experienced enough yet to be writing code but let me know if you come up with a more elegant way to do it.