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.
transform btn_trans_1_up:
on show:
linear 1.0 ypos -775
on hide:
linear 1.0 ypos 0
transform btn_trans_1_down:
on show:
linear 1.0 ypos 0
on hide:
linear 1.0 ypos -775
transform btn_trans_2_down:
on show:
linear 1.0 ypos 350
on hide:
linear 1.0 ypos 0
transform btn_trans_2_up:
on show:
linear 1.0 ypos 0
on hide:
linear 1.0 ypos 350
define btn_trans_1_check = False
screen choice_2():
##hbox: / from here ##
showif btn_trans_1_check == True:
add "images/Tutorial/Choice/[concept]/choice_window_alt.png" at btn_trans_2_down
add "images/Tutorial/Choice/[concept]/choice_window_4.png" at btn_trans_1_up
add "images/Tutorial/Choice/[concept]/2.png" at btn_trans_2_down
imagebutton:
at btn_trans_1_up
idle "images/Tutorial/Choice/[concept]/1.png"
action SetVariable("btn_trans_1_check",False)
else:
add "images/Tutorial/Choice/[concept]/choice_window_alt.png" at btn_trans_2_up
add "images/Tutorial/Choice/[concept]/choice_window_4.png" at btn_trans_1_down
add "images/Tutorial/Choice/[concept]/2.png" at btn_trans_2_up
imagebutton:
at btn_trans_1_down
idle "images/Tutorial/Choice/[concept]/1.png"
action SetVariable("btn_trans_1_check",True)
add "images/Tutorial/Choice/[concept]/choice_frame.png"
i can write all 4 of them but i want something neat, usable and flexible.
Maybe using grid may help but i dont know.
Is there a code that will act as a bag and cover all this block code. If there is, I think it will be enough to repeat it 4 times. When I try for Frame, Viewport and Fixed, the transforms do not work. Please enlighten me.
Last edited by ZianRiyone on Tue Mar 05, 2024 9:24 am, edited 1 time in total.