Hello, in first, excuse my bag english
I have a problem with my game.
I want create a imagebutton, but I need help for my code.
I make that :
init:
$ test_01 = True
label chapter_01:
scene map_01
if test_01:
imagebutton:
xpos 402 ypos 22
idle "images/localisation_01.png"
hover "images/localisation_02.png"
action [jump chapter_02]
But I have a "expected statement" ...
Thanks for your help ...
imagebutton help
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.
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.
-
- Regular
- Posts: 31
- Joined: Sat Jun 02, 2018 3:00 pm
- Contact:
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: imagebutton help
You're using screen language in a label. What you want to do is make a screen with the button in it and then show the screen, also define your variable with default instead of a python statement.
Code: Select all
default test_01 =True
screen test():
if test_01:
imagebutton:
xpos 402 ypos 22
idle "images/localisation_01.png"
hover "images/localisation_02.png"
action Jump("chapter_02")
label chapter_01:
scene map_01
show screen test
"This is a button."
-
- Regular
- Posts: 31
- Joined: Sat Jun 02, 2018 3:00 pm
- Contact:
Re: imagebutton help
Great, It's exactly that !!!
Thanks !!!!
Thanks !!!!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]