Search found 786 matches
- Wed Jun 13, 2018 4:27 pm
- Forum: Ren'Py Questions and Announcements
- Topic: "expected statement" error
- Replies: 6
- Views: 2403
Re: "expected statement" error
Yeah the tutorial code is not a good place to look by the looks of it. As xavimat said, it uses some unique stuff that PyTom had written, probably to allow you see the code being executed during the tutorial itself. You're better off using The Question's code for experimenting with - though I don't ...
- Wed Jun 13, 2018 4:24 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Stats lowering with real time pass [SOLVED]
- Replies: 5
- Views: 1816
Re: Stats lowering with real time pass [SOLVED]
Hey cool! I ended up learning some new stuff myself like how to pass functions around and what python datetime functions there are. It was a fun little experiment 
- Wed Jun 13, 2018 1:41 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Stats lowering with real time pass [SOLVED]
- Replies: 5
- Views: 1816
Re: Stats lowering with real time pass
So I had a go at making this just now and it seems to work. I've added comments in the code but I'll do more explanation further down. # check all tickers on game load label after_load: $ check_all_tickers() return init python: config.layers.append("ticker") from datetime import datetime, timedelta ...
- Wed Jun 13, 2018 9:43 am
- Forum: Ren'Py Questions and Announcements
- Topic: Stats lowering with real time pass [SOLVED]
- Replies: 5
- Views: 1816
Re: Stats lowering with real time pass
You've got a few problems with your code. if minutes += 60: $ hunger_level -=1 This contains the following errors: - you haven't indented the line beneath the if statement - that's how python blocks work - your if statement doesn't contain a comparison operator - you're trying adding 60 to minutes i...
- Tue Jun 12, 2018 6:34 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Visual novel help ;-;
- Replies: 54
- Views: 5191
Re: Visual novel help ;-;
When you use at center, at left and at right, you're using pre-existing transforms in Renpy: https://www.renpy.org/doc/html/transforms.html When you use a transform, Renpy places the image exactly where the transform says it goes - it doesn't take any consideration into whether you already have some...
- Tue Jun 12, 2018 5:05 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Sound in screens
- Replies: 7
- Views: 1911
Re: Sound in screens
In that case you probably need to do this: imagebutton auto "numbers/" + t_nums[lock1] + "_%s.png": Change the other imagebuttons to lock2 and lock3 as well. But I'd highly highly recommend you change the filenames so it uses 0,1,2,3,4,5,6,7,8,9 etc. instead of noll, ett, two etc. Because you'd be a...
- Tue Jun 12, 2018 5:03 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Defining and defaulting variables? [SOLVED]
- Replies: 2
- Views: 746
Re: Defining and defaulting variables?
If you know you need to create each character with unique values, you'd be better off adding those as parameters to your constructor: init -1: python: class NPC(object): def __init__(self, name, alive=True, hasMet=False, relationship=1, isFollowing=False): self.name = name self.alive = alive self.ha...
- Tue Jun 12, 2018 11:06 am
- Forum: Ren'Py Questions and Announcements
- Topic: SOLVED Adding a picture to a textbutton while hovered (a "pointer")
- Replies: 3
- Views: 854
Re: SOLVED Adding a picture to a textbutton while hovered (a "pointer")
Cool! Yeah sometimes you spend ages trying to get something to work and then someone tells you a builtin feature! I certainly have had that happen to me a good few times 
- Tue Jun 12, 2018 4:38 am
- Forum: Ren'Py Questions and Announcements
- Topic: SOLVED Adding a picture to a textbutton while hovered (a "pointer")
- Replies: 3
- Views: 854
Re: Adding a picture to a textbutton while hovered (a "pointer")
I don't think you should be putting buttons inside buttons - I'm not sure what actually happens, but I don't think you need to do this at all anyway. Also you generally can't dictate how you want the syntax to be unless you're talking about custom functions, you'll typically have to follow Ren'py's ...
- Mon Jun 11, 2018 4:30 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Sound in screens
- Replies: 7
- Views: 1911
Re: Sound in screens
Did you read through everything I wrote that explains how the code works? lock_increment takes the name of the variable, then using python's global() dictionary to grab the right lock variable, and calculate what the next value should be. The calculation is: n = (n + 1) % 3 That increments your vari...
- Mon Jun 11, 2018 3:41 am
- Forum: Ren'Py Questions and Announcements
- Topic: Why can't i close a screen within a screen
- Replies: 4
- Views: 577
Re: Why can't i close a screen within a screen
I think the conventional method of playing talking animations whilst text is being shown would be to just show the animated image. You should be able to achieve what you wanted with transforms and not using a screen (which is a very strange and probably inefficient way of approaching this). What exa...
- Sun Jun 10, 2018 6:06 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Sound in screens
- Replies: 7
- Views: 1911
Re: Sound in screens
Ok this is just a quick untested mock up before I go to bed, so you'll most likely need to tweak it: define t_nums = {0: "noll", 1: "ett", 2: "two"} default lock1 = 0 default lock2 = 0 default lock3 = 0 default unlocked = False init python: def lock_increment(lock): globals()[lock] = (globals()[lock...
- Sun Jun 10, 2018 5:33 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Non Repeating Random without Infinite Loop Error
- Replies: 7
- Views: 1114
Re: Non Repeating Random without Infinite Loop Error
Can I ask when you say non-repeating, what's supposed to happen when all the cards have been shown? And am I right in understanding that you're trying to do this across play sessions? i.e. show a different card each time I launch your game? If you want this across play sessions, then you'll need to ...
- Sun Jun 10, 2018 3:26 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Visual novel help ;-;
- Replies: 54
- Views: 5191
Re: Visual novel help ;-;
Not a burden at all! Just don't be scared of the error messages, try and read them and see if they make sense first, and if you're stuck, quite often you can just google the error message and find solutions that way too 
- Sun Jun 10, 2018 3:13 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Side image transition help.
- Replies: 3
- Views: 622
Re: Side image transition help.
Not that I'm aware of. However, you may be able to trick the player but creating narrator character for each of your NPCs, and use them as the narrator in those instances. e.g. e = Character("Eileen", image="eileen") en = Character("", image="eileen") # your narrator with eileen picture label start:...