Search found 46 matches

by Queex
Fri Mar 11, 2016 3:41 pm
Forum: Ren'Py Questions and Announcements
Topic: Arrays not affected by rollback?
Replies: 2
Views: 304

Re: Arrays not affected by rollback?

I had a problem like that a little while back - I solved it when I realized that I originally defined the variables in an 'init:' block. Making sure they were defined as 'default' solved my problem. (Note: If you're doing serious Python coding, you might need to declare the variable twice - once as...
by Queex
Fri Mar 11, 2016 2:37 pm
Forum: Ren'Py Questions and Announcements
Topic: Arrays not affected by rollback?
Replies: 2
Views: 304

Arrays not affected by rollback?

I've noticed that some varialbes I'm setting don't seem to be participating in rollback properly, leaving to unexpected behaviour when rolling back and forth. They are arrays in a particular namespace, and it appears they are unchanged by rolling back. I've tried making a toy example, but can't repl...
by Queex
Fri Mar 11, 2016 12:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Python statement equivalents
Replies: 6
Views: 1648

Re: Python statement equivalents

Ok, many thanks, I think I've got a better handle on what's going on. With some significant experimentation, I've got it behaving. I think my problem was how renpy.show parses the arguments; the image you use can be given as a string that names a renpy image object, but you can't do the same thing f...
by Queex
Fri Mar 11, 2016 10:36 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Python statement equivalents
Replies: 6
Views: 1648

Re: Python statement equivalents

Okay, so to do that: How can I get a Transform object (which is what the at_list is expecting, based on the error message) when the Transform is defined in a renpy statement? or How can I define a Transform object in a python block? It looks like a Transform object is specific to a child displayable...
by Queex
Fri Mar 11, 2016 10:01 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Python statement equivalents
Replies: 6
Views: 1648

Re: Python statement equivalents

Well, the random part isn't actually relevant; what I'm having trouble with is duplicating:

Code: Select all

show someimage at sometransform with sometransition
in a python block, as I don't think renpy statements support lists (or, at last, I can't find a way to define such lists in a renpy-friendly manner).
by Queex
Fri Mar 11, 2016 9:42 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Python statement equivalents
Replies: 6
Views: 1648

[SOLVED] Python statement equivalents

I'm having difficulty getting my head around some the proper python statement equivalents. I want the python equivalents in order to avoid a 100-branch ifelse tree. init: image image1="someimage" image image2="otherimage" $ image_array=["image1","image2"] transform pos1: xalign=0.2 yalign=0.5 transf...
by Queex
Thu Mar 10, 2016 6:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Interpolation and arrays
Replies: 4
Views: 426

Re: Interpolation and arrays

Hmm, that doesn't seem to work with the implicit say or menu statements, although I suppose it might in other places where you might use interpolation.
by Queex
Wed Mar 09, 2016 3:46 pm
Forum: Ren'Py Questions and Announcements
Topic: Interpolation and arrays
Replies: 4
Views: 426

Re: Interpolation and arrays

Ah, well, I can live with that. Just wanted to make sure I wasn't missing a cleaner way of doing it.

Cheers!
by Queex
Wed Mar 09, 2016 3:04 pm
Forum: Ren'Py Questions and Announcements
Topic: Interpolation and arrays
Replies: 4
Views: 426

Interpolation and arrays

This doesn't seem to work: $ somearray=['A','B','C'] $ someindex=2 "[somearray[someindex]]" with: File "game/script.rpy", line 68, in script "[somearray[someindex]]" TypeError: list indices must be integers, not unicode If there a way of achieving this that doesn't involve creating temporary variabl...
by Queex
Wed Mar 25, 2015 10:40 am
Forum: Creator Discussion
Topic: Black and White?
Replies: 7
Views: 1162

Re: Black and White?

Monochrome would definitely remind people of manga. I'd say go for it, if you think it fits. It'd be something different about the game. I'm a sucker for high-contrast inked work. You could use colour super sparingly, to suggest particular themes (Schindler's List style). Or tint the entire scene wi...
by Queex
Wed Mar 25, 2015 9:01 am
Forum: Ren'Py Questions and Announcements
Topic: Indenting problem?
Replies: 2
Views: 376

Re: Indenting problem?

The menu choices must begin with strings, showing what the choice is. If you want a condition on when the option appears, you put the if statement afterwards: "build a hut" if wood >=10: ... It gets called an indentation error because ren'py's best-guess as to what you were trying to do is that the ...
by Queex
Wed Mar 25, 2015 5:53 am
Forum: Ren'Py Questions and Announcements
Topic: NameError: name is not defined [solved]
Replies: 3
Views: 913

Re: NameError: name is not defined [solved]

Yeah, ren'py reloads scripts and resources and tries to carry on from the previous position, but it doesn't always do so perfectly. For example, if you added the line that defined 'password', then reloaded, then the variable would not be set because it wasn't in the array of stored values before the...
by Queex
Tue Mar 24, 2015 12:17 pm
Forum: Creator Discussion
Topic: Using synthesia to create your game's soundtrack?
Replies: 4
Views: 1272

Re: Using synthesia to create your game's soundtrack?

Yes.

Worst-case scenario, you would need to find a midi->ogg converter and convert it yourself, something like this: http://audio.online-convert.com/convert-to-ogg (Note I do not recommend them, they were just the first google hit that came up and they seem to offer what you would need).
by Queex
Tue Mar 24, 2015 12:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Nonetype is not iterable - returning from the gm to the mm
Replies: 4
Views: 842

Re: Nonetype is not iterable - returning from the gm to the

Not sure, but I think the nulls in there are the problem.

Instead try:

Code: Select all

        if not main_menu:
            textbutton _("S A V E   D A T A") action ShowMenu("save")
And the same for the other use of null.
by Queex
Tue Mar 24, 2015 12:10 pm
Forum: Ren'Py Questions and Announcements
Topic: How to stop labels from playing early?
Replies: 2
Views: 470

Re: How to stop labels from playing early?

By default, when ren'py reaches the end of one label, it will carry straight onto the next one. Screens are probably not the way to approach this problem, actually, at least as a novice. the menu command offers choices and handles different branching, with simpler syntax. living_1: menu: "right": ju...