Making a screen that shows results one by one
Posted: Mon Mar 30, 2020 10:03 am
Hi guys,
I am trying to create a specific screen animation that displays the results of an interaction (like stat X up by Y, gold and XP made...) one after the other. Basically it's like a vbox, with each element fading in after the other. Cherry on top would be to have a brief 'tadaa' sound playing as each result shows.
I'm guessing using ATL inside the screen would be best, but I have no clue exactly how to go about it.
I'm guessing it would look something like this:
My problem is that I have no idea how to write the "magic_transform" part or how to add a timer to make it happen each after the other (or how to play a sound at the same time, for that matter).
If you could point me in the right direction, a quick code example would be awesome... Thank you!
I am trying to create a specific screen animation that displays the results of an interaction (like stat X up by Y, gold and XP made...) one after the other. Basically it's like a vbox, with each element fading in after the other. Cherry on top would be to have a brief 'tadaa' sound playing as each result shows.
I'm guessing using ATL inside the screen would be best, but I have no clue exactly how to go about it.
I'm guessing it would look something like this:
Code: Select all
screen result_screen:
has vbox
text "Results" bold True
text "Strength: +" + str(strength_bonus) at magic_transform # fades in after 1 second, playing sound
text "XP: +" + str(xp_bonus) at magic_transform # fades in after 2 second, playing sound
text "Gold: +" + str(gold_bonus) at magic_transform # fades in after 3 second, playing soundIf you could point me in the right direction, a quick code example would be awesome... Thank you!