SOLVED - choice entering one by one

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.
Post Reply
Message
Author
User avatar
cl0ud
Newbie
Posts: 5
Joined: Mon Aug 07, 2023 3:43 pm
Projects: Ghosts of Fujoshima
Location: France
Contact:

SOLVED - choice entering one by one

#1 Post by cl0ud »

hi, i have an entry animation of the choices that works perfectly with a transform, however, i would like the choices to appear one at a time, and not all at once. Here is my code :

Code: Select all

transform anim_choice:
    on show:
        xpos -1280
        easein 1.0 xpos 1 #xalign 0.5
Last edited by cl0ud on Tue Aug 08, 2023 9:42 am, edited 1 time in total.

enaielei
Veteran
Posts: 293
Joined: Fri Sep 17, 2021 2:09 am
Organization: enaielei
Tumblr: enaielei
Deviantart: enaielei
Github: enaielei
Skype: enaielei
Soundcloud: enaielei
itch: enaielei
Discord: enaielei#7487
Contact:

Re: choice entering one by one

#2 Post by enaielei »

Add a parameter to the transform.

Code: Select all

transform anim_choice(idx=0):
    on show:
        xpos -1280
        pause (0.10 * idx)
        easein 1.0 xpos 1 #xalign 0.5

Code: Select all

for idx, i in enumerate(choices):
    textbutton i.caption action i.action:
        at anim_choice(idx)

User avatar
cl0ud
Newbie
Posts: 5
Joined: Mon Aug 07, 2023 3:43 pm
Projects: Ghosts of Fujoshima
Location: France
Contact:

Re: choice entering one by one

#3 Post by cl0ud »

Well, i've seen a solution but thxs !

Post Reply

Who is online

Users browsing this forum: Google [Bot]