Hello!
I know persistent variables when not decalred, default to None. So i usually had never declared them until recently. But i see here and there people do it and then again some not. I assume both is ok to do, but i wonder what is better?
Declare persistent variables or not?
Search found 316 matches
- Sat Jun 16, 2018 4:35 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Declare persistent variables?
- Replies: 2
- Views: 467
- Sat Jun 16, 2018 12:42 pm
- Forum: Ren'Py Questions and Announcements
- Topic: if statement always false
- Replies: 6
- Views: 957
Re: if statement always false
So mitoky's nailed it I think that the issue is because renpy.input returns a string, so you'd be comparing "10" == 10 for example and they don't equal. Casting the value into an int would work: int("10") == 10 However, if you cast the renpy.input directly as an int, then this s...
- Fri Jun 15, 2018 8:23 pm
- Forum: Ren'Py Questions and Announcements
- Topic: if statement always false
- Replies: 6
- Views: 957
Re: if statement always false
I could be wrong on why this is the case but i think its because the text input is a string while the number is an integer. (i hope someone knows how to explain this better as i am not good with this myself) A solution which works is change this: $ inputzahl = renpy.input("Was ist [a] + [b]?&qu...
- Wed Jun 13, 2018 9:35 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Show menu animation only if game is starting up
- Replies: 9
- Views: 1031
Re: Show menu animation only if game is starting up
That is weird, in mine it does stay? //thinks
- Wed Jun 13, 2018 9:14 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Show menu animation only if game is starting up
- Replies: 9
- Views: 1031
Re: Show menu animation only if game is starting up
Same as with the splashscreen, both it and the menu are separate, so the content in the main menu needs to be in the main menu in either case. Ahh ok i see. I have been wondering about this for a while because whatever i show in the before main menu label stays in the main menu screen. So i am a li...
- Wed Jun 13, 2018 8:47 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Show menu animation only if game is starting up
- Replies: 9
- Views: 1031
Re: Show menu animation only if game is starting up
You can also use label before_main_menu: Though I would use the splashscreen. However, the splashscreen is ahown ONCE. If a player reaches an ending and returns to the main menu, the splashscreen will not show a second time. Trowing a small question in. When using the before_main_menu label to set ...
- Mon Jun 11, 2018 7:28 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Main Menu That Adds A New Imagebutton After Each Ending?
- Replies: 3
- Views: 627
Re: Main Menu That Adds A New Imagebutton After Each Ending?
If you use if & elif, it executes it in order. Hence if the first is "true" that one is shown and the others not. So use only "if" for each button and do it like this: First of all we make a persistent for each ending: default persistent.ending_frank = False default persisten...
- Wed Jun 06, 2018 3:26 pm
- Forum: Completed Games
- Topic: Agent of Love - Ayumu MS update Out Now! [GxB] IOS/Android/Steam PC/Mac Josei, Romance, Mystery, Drama, Commercial
- Replies: 256
- Views: 64429
Re: Agent of Love [GxB]) Josei, Romance, Mystery, Drama, Commercial
I am surprised no one commented here yet.
The game looks really pretty and the story sounds interessting to me! (i love darker stories)
Good luck on this! owo
The game looks really pretty and the story sounds interessting to me! (i love darker stories)
Good luck on this! owo
- Mon Jun 04, 2018 10:05 am
- Forum: Ren'Py Questions and Announcements
- Topic: Questions about the History Screen [SOLVED]
- Replies: 6
- Views: 1180
Re: Questions about the History Screen
I had the exact same problem few days ago! You have to add a vbox. + i noticed "for h in _history_list:" is missing. it should be like this: Double check your code, you've left two versions of for h in _history_list in there :P TellerFarsight: As mitoky said, you need the vbox: because Re...
- Mon Jun 04, 2018 2:26 am
- Forum: Ren'Py Questions and Announcements
- Topic: Questions about the History Screen [SOLVED]
- Replies: 6
- Views: 1180
Re: Questions about the History Screen
I had the exact same problem few days ago! You have to add a vbox. + i noticed "for h in _history_list:" is missing. it should be like this: screen page2(): tag menu predict False viewport: xpos 80 ypos 80 yinitial 1.0 scrollbars "vertical" mousewheel True draggable True xsize 40...
- Sat Jun 02, 2018 11:33 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] History Screen Issue
- Replies: 2
- Views: 1452
Re: History Screen Issue
I had a lot of issues while customizing History window, and I had something like this too. Use a vbox there, like this. viewport: style_prefix "history" yinitial 1.0 xanchor 0.5 xpos 390 yanchor 0.0 ypos 150 xmaximum 356 ymaximum 610 draggable True mousewheel True scrollbars "vertica...
- Sat Jun 02, 2018 10:42 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] History Screen Issue
- Replies: 2
- Views: 1452
[SOLVED] History Screen Issue
Hello! I have an issue with a history screen. I want the textbox content to be layed out based on each size + space inbetween rather than fixed sizes. Hence i though i should use viewport. However, it completly ignores it and simply places everything in once place at the top. I already tried everyth...
- Fri Jun 01, 2018 8:38 am
- Forum: Ren'Py Questions and Announcements
- Topic: Problem with ATL of Main Menu Button
- Replies: 7
- Views: 1227
Re: Problem with ATL of Main Menu Button
The list of ATL events are: The following events can be triggered automatically: start A pseudo-event, triggered on entering an on statement, if no event of higher priority has happened. show Triggered when the transform is shown using the show or scene statement, and no image with the given tag ex...
- Fri Jun 01, 2018 6:08 am
- Forum: Ren'Py Questions and Announcements
- Topic: Problem with ATL of Main Menu Button
- Replies: 7
- Views: 1227
Re: Problem with ATL of Main Menu Button
Did you get any error when trying either, or did it simply do the same as it was in the first place? This is what I was suggesting: transform main_menu_buttons_dissolve: alpha 1.0 on hover, replaced: alpha 0.3 linear 1.0 alpha 1.0 It completly ignores on replaced and only dissolves when on hover. I...
- Fri Jun 01, 2018 6:04 am
- Forum: Ren'Py Questions and Announcements
- Topic: Problem with ATL of Main Menu Button
- Replies: 7
- Views: 1227
Re: Problem with ATL of Main Menu Button
This is only a guess, but what happens if you replace "on idle" with "on replaced" https://www.renpy.org/doc/html/atl.html?highlight=replaced#external-events Actually, I think I see the issue. transform main_menu_buttons_dissolve: alpha 1.0 on idle: alpha 0.3 linear 1.0 alpha 1....