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.
I want to make an Imagebutton but something is wrong with my code. It says "File "game/script.rpy", line 147: expected statement. (see PNG)
I also attached my script....
This is where its not working;
if scene w17:
imagebutton auto "images/mm_w171a_%s.jpg"
action jump w17a
"Jason""Ich sollte an die Tür gehen"
Im really new into coding so im trying to get every expertise or help i become. If there is something fundamentally missing pls tell me!
- (4.39 KiB) Downloaded 4 times
First thing is that imagebutton should be a part of the screen. Then you need to show or call this screen to let player interact with it. And 'jump' is not valid action for imagebutton - should be 'Jump".
Also, 'if scene w17:' will not work, 'cause name of variable should be a single word (that must start from letter and may have letters, digits and underscores).
Code: Select all
default flag_variable = False screen some_screen_name(): imagebutton auto "images/mm_w171a_%s.jpg" action Jump('w17a') align(0.5, 0.5) label w17a: hide screen some_screen_name "Secret ending." return label start: "no button on screen" menu: "Want to see the button?" "Yes": $ flag_variable = True "No": pass if flag_variable: show screen some_screen_name "now you can click the button..." "...if you wish." hide screen some_screen_name "well..." "neutral ending" return
https://www.renpy.org/doc/html/language ... statements
Users browsing this forum: No registered users