I feel like this should be simple, and I'm just too inexperienced with images to make it happen on my own...
Anyway, how can I get a little 'achievement unlocked' banner to appear, then fade out, like they do on Steam etc? I've got a bonus gallery whose elements only unlock after picking certain choices throughout the game. When the player's unlocked something, I'd like to alert them via little banner in the corner so they know not to take that path again next playthrough.
Achievement Unlocked notification?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Veteran
- Posts: 356
- Joined: Mon Mar 11, 2013 11:03 pm
- Contact:
Re: Achievement Unlocked notification?
This can done by using persistent data and showing the notification with a bit of ATL. For example:
NOTE: Persistent booleans go from False to True, so this if statement may look funny.
Code: Select all
image achieve1 = "achieve1.png"
transform achieveanim:
xalign 1.0 yalign 0.0 alpha 0.0
easeout 0.5 alpha 1.0
2.5 # Pause
linear 3.0 alpha 0.0
label start:
"DEMO: achievement notification with persistent data"
if not persistent.achieve1:
show achieve1 at achieveanim with hpunch
"You will not see the image again until you clear persistent data."
$ persistent.achieve1 = True
return
Re: Achievement Unlocked notification?
Whoa, thanks guy! Exactly what I needed.
Who is online
Users browsing this forum: barsunduk, Bing [Bot]