Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
Smaymay
- Regular
- Posts: 70
- Joined: Fri Jul 01, 2016 11:35 am
- Completed: Vicboys demo
- Tumblr: esmmeh
- Deviantart: Smaymay
- Location: The Netherlands
-
Contact:
#1
Post
by Smaymay » Mon Dec 25, 2017 5:06 pm
First of all, for anyone reading this thread today... Merry Christmas! haha. And now to get on topic:
I want my Skip Indicator to ease in when the player turns on 'Skip Mode' and I want it to ease out when he turns it off. The ease in part works fine but when I got to the if statement I got an error saying the ATL statement doesn't expect a block. So I don't even know if I was on the right track with this method XD Any thoughts? Thanks!
Code: Select all
screen skip_indicator():
zorder 1000
add "images/GUI/maingame/skip_indicator.png" at skip_eff
Code: Select all
init -2:
transform skip_eff:
if config.skipping:
xalign 2.0 ypos 28
pause 0.0
easein 0.3 xalign 1.0
else:
xalign 1.0 ypos 28
pause 0.0
easein 0.3 xalign 2.0
ERROR MESSAGE:
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/main scripts/screens.rpy", line 549: Line is indented, but the preceding ATL statement does not expect a block. Please check this line's indentation.
xalign 2.0 ypos 28
^
Ren'Py Version: Ren'Py 6.99.13.2919
Last edited by
Smaymay on Mon Dec 25, 2017 6:43 pm, edited 1 time in total.
-
IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
-
Contact:
#2
Post
by IrinaLazareva » Mon Dec 25, 2017 5:42 pm
try
Code: Select all
transform skip_eff:
on show:
xalign 2.0 ypos 28
0.0
easein 0.3 xalign 1.0
on hide:
xalign 1.0 ypos 28
0.0
easein 0.3 xalign 2.0
screen skip_indicator():
zorder 1000
add "images/GUI/maingame/skip_indicator.png" at skip_eff
-
Smaymay
- Regular
- Posts: 70
- Joined: Fri Jul 01, 2016 11:35 am
- Completed: Vicboys demo
- Tumblr: esmmeh
- Deviantart: Smaymay
- Location: The Netherlands
-
Contact:
#3
Post
by Smaymay » Mon Dec 25, 2017 6:43 pm
@IrinaLazareva
Works like a charm! Thank you
