Search found 556 matches
- Mon Jan 06, 2020 6:55 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Can I use "call" for multiple menu choices?
- Replies: 11
- Views: 1370
Re: Can I use "call" for multiple menu choices?
Normally you don't have two options with the same text anyway so I don't see why that would be an issue (assuming that you use different sets for each menu, I guess), but the main disadvantage of set is that you can't use it if you want a 'sticky' option -- i.e., if you had something like "Lea...
- Mon Dec 02, 2019 12:36 am
- Forum: Ren'Py Questions and Announcements
- Topic: "Expected menuitem -> else:"?
- Replies: 2
- Views: 732
Re: "Expected menuitem -> else:"?
The menu is expecting a choice for the player to click on; you can't just stick an else into it. If you want the option to only show if all the other options are true, you could do: menu: "Shopping District" if searchsd == False: jump search_SD "Graveyard" if searchgy == False: j...
- Tue Sep 18, 2018 4:42 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to make 4 digit brass number lock
- Replies: 4
- Views: 1089
Re: How to make 4 digit brass number lock
You don't want to make one like that, Master Lock are well known for being terrible quality
https://www.youtube.com/watch?v=bfDPtt-bnAI
https://www.youtube.com/watch?v=bfDPtt-bnAI
- Sat Sep 08, 2018 9:18 am
- Forum: Ren'Py Questions and Announcements
- Topic: Open URL at end of game
- Replies: 3
- Views: 8290
Re: Open URL at end of game
Why would you want to, though? I don't think I'd be happy about a game hijacking my browser to open pages without warning. It could take me to some virus laden page or anywhere.
- Fri Aug 31, 2018 1:11 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Ren'PY Event by Clock Time
- Replies: 2
- Views: 1135
Re: Ren'PY Event by Clock Time
The bit about importing datetime to get the actual date/time is the bit that seems pertinent to your question. You can either import time or datetime, it seems; there's a discussion here: https://stackoverflow.com/questions/415511/how-to-get-the-current-time-in-python about how to do it. Just put th...
- Wed Aug 29, 2018 11:02 am
- Forum: Ren'Py Questions and Announcements
- Topic: How do you create an output text file?
- Replies: 9
- Views: 3361
Re: How do you create an output text file?
How about including a shortcut file that leads to the text file, and asking them to save it somewhere more convenient? But yes, you could probably fairly easily code an in game journal rather than creating an external text document.
- Mon Jul 23, 2018 12:18 pm
- Forum: Ren'Py Questions and Announcements
- Topic: so my menu flag isnt working [SOLVED]
- Replies: 6
- Views: 737
Re: so my menu flag isnt working
So long as you define it at some point you should be fine. I think your code would have issues because on the "alone" branch you've skipped past defining it, so it never gets defined if they make that option. You can either set it to something at the start (like with default), or make sure...
- Wed Jul 18, 2018 12:07 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Only allowing a variable to add to a value the first time an option is clicked?
- Replies: 8
- Views: 1130
Re: Only allowing a variable to add to a value the first time an option is clicked?
BUT you need something after the menu when there are no more options. When renpy finds a menu with conditions in a way that there is no option available, it simply skips the entire menu (to avoid blocking the game: a menu without buttons to click!). Either that, or have one of your menu options run...
- Sat May 03, 2014 11:38 am
- Forum: Ren'Py Questions and Announcements
- Topic: Day Counter, Using it, multiple sheets & Python
- Replies: 5
- Views: 3621
Re: Day Counter, Using it, multiple sheets & Python
The code in your first question looks fine (albeit not very useful) apart from the bit at the bottom - I think using either "Day: [day]" or "Day: %(day)d" should work. You need the d on the end to tell the programme that it's an integer, I believe - you'd use s for strings, and s...
- Thu Apr 24, 2014 12:37 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Menu Choices
- Replies: 10
- Views: 1355
Re: Menu Choices
To make a conditional menu choice, just use if. Let's say that earlier in the game players could choose to learn Spanish, which set a variable $ Spanish = True (and if they chose not to it's set to $ Spanish = False). Then your menu could read: "What shall I do today?" menu: "Go shopp...
- Sat Apr 05, 2014 7:13 pm
- Forum: Ren'Py Questions and Announcements
- Topic: If Statement for DSE isn't working
- Replies: 1
- Views: 452
Re: If Statement for DSE isn't working
You don't have any if statements in the code you posted; are there meant to be some?
- Mon Mar 03, 2014 12:14 am
- Forum: Ren'Py Questions and Announcements
- Topic: help-a-noob: which script file to use for an in-game menu
- Replies: 2
- Views: 608
Re: help-a-noob: which script file to use for an in-game men
Technically, it doesn't really matter which .rpy file you put any of the coding in - Ren'Py will run code from any and all .rpy files it finds in your game directory. It's probably best to try and keep each bit of code somewhere sensible, though, so you can remember where to find it.
- Tue Feb 25, 2014 7:07 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Using Imagemap To Create Mini-Game [SOLVED]
- Replies: 14
- Views: 2434
Re: Using Imagemap To Create Mini-Game
Not quite sure how you want it to work. Does every key represent a specific letter, does player need to hit keys in right order, what's gonna happened if player hit wrong key? If you'll have answers - you'll be able to get rid of all those if-conditions and check the result in a game loop. From wha...
- Sun Feb 23, 2014 9:54 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Ren'Py Code Question...
- Replies: 2
- Views: 708
Re: Ren'Py Code Question...
You have 6 spaces before the if player_name line and only 4 before the p "I am... line. They need to line up; I'd probably stick with 4 throughout. In fact, do those lines need to be indented at all? $ player_name = player_name.strip() if player_name == "": $ player_name="Mei Jon...
- Sun Feb 23, 2014 8:16 am
- Forum: Ren'Py Questions and Announcements
- Topic: Using Imagemap To Create Mini-Game [SOLVED]
- Replies: 14
- Views: 2434
Re: Using Imagemap To Create Mini-Game
Not entirely sure where the problem is, but you could make the coding a lot neater by only checking the key you're pressing and the previous one. So, the w0 key if w0 == False: $ w0 = True (snip) The h1 key: if w0 == True and h1 == False: $ h1 = True (snip) the y2 key: if h1 == True and y2 == False:...