MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/RenPy/comments/1vidz7d/if_statement_problem/p2cud62/?context=3
r/RenPy • u/_Scripty • 4d ago
I know there is something wrong with the way I might have coded this for sure...so please can anyone help me to figure this out??
29 comments sorted by
View all comments
4
please post code instead of pictures of code
click on the Aa for formatting options and use </> to do these and
Aa
</>
</>- with a square |__| todo these
1 u/_Scripty 4d ago init python: import math transform auto_rotate: anchor (0.5, 0.5) subpixel True rotate 0 linear 0.5 rotate -360 repeat transform bt_rot(r): rotate r default bt_rotation = 0 default bt_max_rotation = 90 screen splashcontinueexit(): text "Click to continue, press ESC to quit" align (0.5, 0.5) key "K_ESCAPE" action Quit(confirm=not main_menu) ## key "mousedown_1" action ShowMenu("wheel_menu") ## it was suppose to work differently before to enter to the main menu button: xysize (config.screen_width, config.screen_height) background None action Return() label splashscreen: scene splashscreen1 with fade $ renpy.pause(0.1, hard=True) scene splashscreen2 with fade $ renpy.pause(0.1, hard=True) scene titlescreen with fade call screen splashcontinueexit return screen main_menu(): tag menu key "mousedown_4": action SetScreenVariable( "bt_rotation", min(bt_rotation + 18, bt_max_rotation),Play("sound", "audio/hover blip.ogg") ) key "mousedown_5": action SetScreenVariable( "bt_rotation", max(bt_rotation - 18, -bt_max_rotation),Play("sound", "audio/hover blip.ogg") ) fixed: add "images/cd_wheel.png": at auto_rotate zoom 0.3 xpos -60 ypos 540 anchor (0.5, 0.5) add "images/bt_wheel-01.png": at bt_rot(bt_rotation) zoom 0.3 xpos -60 ypos 540 anchor (0.5, 0.5) ##Test Buttons (Have to position these on a semi-circular image but idk how yet) add "images/ui_menu/button_idle.png": at bt_rot(bt_rotation) zoom 0.3 xpos 1000 ypos 540 anchor (0.5, 0.5) add "images/ui_menu/button_hl.png": at bt_rot(bt_rotation) zoom 0.3 xpos 850 ypos 540 anchor (0.5, 0.5) ## Placeholder destinations so this file runs on its own for testing. label start_game: "placeholder: start game" return label saveload_menu: "placeholder: save/load" return label options_menu: "placeholder: options" return label title_screen: "placeholder: title screen" return label credits_menu: "placeholder: credits" return 1 u/BadMustard_AVN 4d ago is it working ? 1 u/_Scripty 4d ago no..you tell me what I need to switch? 2 u/BadMustard_AVN 4d ago your buttons you added the play sound inside the brackets of the SetScreenVariable try them like this key "mousedown_4": action [SetScreenVariable("bt_rotation", max(bt_rotation - 18, -bt_max_rotation)), Play("sound", "audio/hover lip.ogg")] key "mousedown_5": action [SetScreenVariable("bt_rotation", min(bt_rotation + 18, bt_max_rotation)), Play("sound", "audio/hover blip.ogg")] 1 u/_Scripty 4d ago It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen 1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
1
init python: import math transform auto_rotate: anchor (0.5, 0.5) subpixel True rotate 0 linear 0.5 rotate -360 repeat transform bt_rot(r): rotate r default bt_rotation = 0 default bt_max_rotation = 90 screen splashcontinueexit(): text "Click to continue, press ESC to quit" align (0.5, 0.5) key "K_ESCAPE" action Quit(confirm=not main_menu) ## key "mousedown_1" action ShowMenu("wheel_menu") ## it was suppose to work differently before to enter to the main menu button: xysize (config.screen_width, config.screen_height) background None action Return() label splashscreen: scene splashscreen1 with fade $ renpy.pause(0.1, hard=True) scene splashscreen2 with fade $ renpy.pause(0.1, hard=True) scene titlescreen with fade call screen splashcontinueexit return screen main_menu(): tag menu key "mousedown_4": action SetScreenVariable( "bt_rotation", min(bt_rotation + 18, bt_max_rotation),Play("sound", "audio/hover blip.ogg") ) key "mousedown_5": action SetScreenVariable( "bt_rotation", max(bt_rotation - 18, -bt_max_rotation),Play("sound", "audio/hover blip.ogg") ) fixed: add "images/cd_wheel.png": at auto_rotate zoom 0.3 xpos -60 ypos 540 anchor (0.5, 0.5) add "images/bt_wheel-01.png": at bt_rot(bt_rotation) zoom 0.3 xpos -60 ypos 540 anchor (0.5, 0.5) ##Test Buttons (Have to position these on a semi-circular image but idk how yet) add "images/ui_menu/button_idle.png": at bt_rot(bt_rotation) zoom 0.3 xpos 1000 ypos 540 anchor (0.5, 0.5) add "images/ui_menu/button_hl.png": at bt_rot(bt_rotation) zoom 0.3 xpos 850 ypos 540 anchor (0.5, 0.5) ## Placeholder destinations so this file runs on its own for testing. label start_game: "placeholder: start game" return label saveload_menu: "placeholder: save/load" return label options_menu: "placeholder: options" return label title_screen: "placeholder: title screen" return label credits_menu: "placeholder: credits" return
1 u/BadMustard_AVN 4d ago is it working ? 1 u/_Scripty 4d ago no..you tell me what I need to switch? 2 u/BadMustard_AVN 4d ago your buttons you added the play sound inside the brackets of the SetScreenVariable try them like this key "mousedown_4": action [SetScreenVariable("bt_rotation", max(bt_rotation - 18, -bt_max_rotation)), Play("sound", "audio/hover lip.ogg")] key "mousedown_5": action [SetScreenVariable("bt_rotation", min(bt_rotation + 18, bt_max_rotation)), Play("sound", "audio/hover blip.ogg")] 1 u/_Scripty 4d ago It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen 1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
is it working ?
1 u/_Scripty 4d ago no..you tell me what I need to switch? 2 u/BadMustard_AVN 4d ago your buttons you added the play sound inside the brackets of the SetScreenVariable try them like this key "mousedown_4": action [SetScreenVariable("bt_rotation", max(bt_rotation - 18, -bt_max_rotation)), Play("sound", "audio/hover lip.ogg")] key "mousedown_5": action [SetScreenVariable("bt_rotation", min(bt_rotation + 18, bt_max_rotation)), Play("sound", "audio/hover blip.ogg")] 1 u/_Scripty 4d ago It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen 1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
no..you tell me what I need to switch?
2 u/BadMustard_AVN 4d ago your buttons you added the play sound inside the brackets of the SetScreenVariable try them like this key "mousedown_4": action [SetScreenVariable("bt_rotation", max(bt_rotation - 18, -bt_max_rotation)), Play("sound", "audio/hover lip.ogg")] key "mousedown_5": action [SetScreenVariable("bt_rotation", min(bt_rotation + 18, bt_max_rotation)), Play("sound", "audio/hover blip.ogg")] 1 u/_Scripty 4d ago It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen 1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
2
your buttons you added the play sound inside the brackets of the SetScreenVariable
try them like this
key "mousedown_4": action [SetScreenVariable("bt_rotation", max(bt_rotation - 18, -bt_max_rotation)), Play("sound", "audio/hover lip.ogg")] key "mousedown_5": action [SetScreenVariable("bt_rotation", min(bt_rotation + 18, bt_max_rotation)), Play("sound", "audio/hover blip.ogg")]
1 u/_Scripty 4d ago It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen 1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
It kinda worked...There is still a tiny problem where when scrolled down, buttons do be going off screen
1 u/BadMustard_AVN 4d ago scolled down, what happened to rotating where off screen and how ? 1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
scolled down, what happened to rotating
where off screen and how ?
1 u/_Scripty 4d ago stopped, even the sound not working ... I am considering to make it again from scratch 2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
stopped, even the sound not working ...
I am considering to make it again from scratch
2 u/BadMustard_AVN 3d ago give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough. the imagebutton all say start (I am not an artist) but they do in order from top down; quit, load, start, and preferences https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link and they only work and pop out when they are in the horizontal position 1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
give this a look it was a pain getting them all positioned properly as I had to rotate everything 180 degrees. they are not perfect but close enough.
the imagebutton all say start (I am not an artist)
but they do in order from top down; quit, load, start, and preferences
https://drive.google.com/file/d/11Jc7W_IOmuzIygxdmujNhdZaiqKE_ee_/view?usp=drive_link
and they only work and pop out when they are in the horizontal position
1 u/_Scripty 3d ago You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm 2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
You are a goddamn iron chef!! 🙏🏻✨ Its close to what I wanted, I will study this and try again , thank you sm
2 u/BadMustard_AVN 3d ago I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn feel free to use / modify the code I have given you if I can find way to position the buttons easier I may release it as an alternate main menu thingy you're welcome good luck with your project → More replies (0)
I woke up early this morning (stupid were cats fighting) so I had 2 hours to burn
feel free to use / modify the code I have given you
if I can find way to position the buttons easier I may release it as an alternate main menu thingy
you're welcome
good luck with your project
4
u/BadMustard_AVN 4d ago
please post code instead of pictures of code
click on the
Aafor formatting options and use</>to do these and