Search found 555 matches

by Showsni
Mon Dec 02, 2019 12:36 am
Forum: Ren'Py Questions and Announcements
Topic: "Expected menuitem -> else:"?
Replies: 2
Views: 123

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: jump search_GY "Park"...
by Showsni
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: 279

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 :P
https://www.youtube.com/watch?v=bfDPtt-bnAI
by Showsni
Sat Sep 08, 2018 9:18 am
Forum: Ren'Py Questions and Announcements
Topic: Open URL at end of game
Replies: 3
Views: 244

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.
by Showsni
Fri Aug 31, 2018 1:11 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'PY Event by Clock Time
Replies: 2
Views: 284

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...
by Showsni
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: 506

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.
by Showsni
Mon Jul 23, 2018 12:18 pm
Forum: Ren'Py Questions and Announcements
Topic: so my menu flag isnt working [SOLVED]
Replies: 6
Views: 262

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 it gets d...
by Showsni
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: 465

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...
by Showsni
Sat May 03, 2014 11:38 am
Forum: Ren'Py Questions and Announcements
Topic: Day Counter, Using it, multiple sheets & Python
Replies: 5
Views: 1921

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 so on. Probably easie...
by Showsni
Thu Apr 24, 2014 12:37 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu Choices
Replies: 10
Views: 844

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 shopping": ... "Stay...
by Showsni
Sat Apr 05, 2014 7:13 pm
Forum: Ren'Py Questions and Announcements
Topic: If Statement for DSE isn't working
Replies: 1
Views: 300

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?
by Showsni
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: 381

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.
by Showsni
Tue Feb 25, 2014 7:07 pm
Forum: Ren'Py Questions and Announcements
Topic: Using Imagemap To Create Mini-Game [SOLVED]
Replies: 14
Views: 1768

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...
by Showsni
Sun Feb 23, 2014 9:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py Code Question...
Replies: 2
Views: 479

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 Jones" p "I am [player_...
by Showsni
Sun Feb 23, 2014 8:16 am
Forum: Ren'Py Questions and Announcements
Topic: Using Imagemap To Create Mini-Game [SOLVED]
Replies: 14
Views: 1768

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:...
by Showsni
Sat Feb 22, 2014 9:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Using Imagemap To Create Mini-Game [SOLVED]
Replies: 14
Views: 1768

Re: Using Imagemap To Create Mini-Game

I think you probably want to use elif here at some point. Instead of saying

Code: Select all

if (blahblahblah):
    do this 
else:
    if (something):
        do that
    else:
        do the other
Try

Code: Select all

if (blahblahblah):
    do this
elif (something):
    do that
else:
    do the other
Does that fix it?