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.
-
Tess
- Newbie
- Posts: 23
- Joined: Thu Aug 04, 2022 3:43 pm
- Projects: The Songbird Guild
- Organization: Yurisoft
- Github: wainwt2
- Discord: Tess#7782
-
Contact:
#1
Post
by Tess » Fri Sep 16, 2022 12:10 am
So in a label, you can use show...at... to apply a transform to a sprite. Is it possible to do something similar on a custom screen? I have a lot of complex movements that are triggered by one displayable but apply to many, so I'm often looking for ways to trigger ATL outside of the standard external events.
Code: Select all
transform move_to_center(duration=1.0):
ease duration xpos 0.5
screen test_screen():
add "images/Ball.png"
textbutton "Move Ball to Center" action #Apply move_to_center to the ball somehow?
label start:
call screen test_screen
Last edited by
Tess on Sat Sep 17, 2022 5:41 pm, edited 1 time in total.
-
enaielei
- Regular
- Posts: 114
- Joined: Fri Sep 17, 2021 2:09 am
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
-
Contact:
#2
Post
by enaielei » Fri Sep 16, 2022 6:13 am
Use variables.
Code: Select all
transform move_to_center(duration=1.0):
ease duration xpos 0.5
screen test_screen():
default move = None
add "images/Ball.png" at move
textbutton "Move Ball to Center" action SetScreenVariable("move", move_to_center)
label start:
call screen test_screen
-
Tess
- Newbie
- Posts: 23
- Joined: Thu Aug 04, 2022 3:43 pm
- Projects: The Songbird Guild
- Organization: Yurisoft
- Github: wainwt2
- Discord: Tess#7782
-
Contact:
#3
Post
by Tess » Sat Sep 17, 2022 5:36 pm
That's so cool! Thank you so much!!
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]