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.
-
morganw
- Regular
- Posts: 51
- Joined: Fri Nov 20, 2015 7:00 pm
-
Contact:
#1
Post
by morganw » Wed Dec 27, 2017 4:57 pm
When 'skipping' is enabled it doesn't seem to be able to skip a transform that is running within a Screen, e.g. in the following example there seems no way to skip the 5 second animation once it has been started:
Code: Select all
image background = 'images/background.png'
image placeholder = Placeholder()
transform test_transform(start_at, move_to, seconds):
xpos start_at
easein seconds xpos move_to
screen test_screen():
default move_to = 0
fixed:
add 'background'
vbox:
textbutton 'Move' action SetScreenVariable('move_to', 200)
textbutton 'Return' action Return()
add 'placeholder' at test_transform(0, move_to, 5)
# The game starts here.
label start:
call screen test_screen
return
Is there any way that skipping can jump the placeholder to the transform destination, or would I have to edit the transform object while it is running to try and achieve the same result? I'm looking to get ready for the next interaction, rather than just exit the screen early.
Thank you for reading.
-
Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
-
Contact:
#2
Post
by Remix » Wed Dec 27, 2017 6:50 pm
Maybe set the seconds based upon renpy.get_skipping()
add 'placeholder' at test_transform( 0, move_to, 5 if not renpy.get_skipping() else 0 )
-
morganw
- Regular
- Posts: 51
- Joined: Fri Nov 20, 2015 7:00 pm
-
Contact:
#3
Post
by morganw » Thu Dec 28, 2017 9:03 am
That worked well, until skipping mode is turned off and the transform gets reset (xpos jumps back to 0).
This seems to fix that:
Code: Select all
add 'placeholder' at test_transform(test_transform.xpos, move_to, 5 if not renpy.get_skipping() else 0)
Thank you for the pointer though, I hadn't considered that I could pass any expression as a parameter.
-
Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
-
Contact:
#4
Post
by Remix » Thu Dec 28, 2017 11:47 am
... and I had no idea you could reference an attribute from a transform so easily. That might well come in useful
We've both learned something, yay
Users browsing this forum: Google [Bot]