Changing scroll/animation speed in-game

Jesse

  • Posts: 102
Is it possible to add these in?

> Change the speed of a scrolling background. (I know it can be set, but I need to modify that value as the game is running)
> Change the speed of an animation playing (same as above)




Darkhog

  • Posts: 1243

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Legendary Hoamaru

  • *
  • Posts: 1088
> Change the speed of an animation playing (same as above)

I haven't looked at actors yet, but it is possible to change the animation speed of the backgrounds through design mode using code.  I'll create a custom block around afternoon-night time.

Edit: Ooo, guess not.  ImageBackground is marked as protected in Area.as.  If I can mark it as a public variable (no real reason to be protected), then this would be possible.  It could also open up the option to be able to change the actual background in game.

« Last Edit: March 23, 2011, 04:43:14 am by Legendary Hoamaru »

Winzenheimer

  • Posts: 97
> Change the speed of an animation playing (same as above)

I haven't looked at actors yet, but it is possible to change the animation speed of the backgrounds through design mode using code.  I'll create a custom block around afternoon-night time.

Edit: Ooo, guess not.  ImageBackground is marked as protected in Area.as.  If I can mark it as a public variable (no real reason to be protected), then this would be possible.  It could also open up the option to be able to change the actual background in game.

Hoamaru, I would love you forever if you made this custom block.

Legendary Hoamaru

  • *
  • Posts: 1088
Added getter/setter methods for the image background in Area.as, so whenever the next build is released I'll be able to create the custom blocks.

Jesse

  • Posts: 102
Sounds good, thank you. :)