Ren'Py questions

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#16 Post by Icekiss »

You seem to be making some sort of image viewer... This is, to some extent, beyond what Ren'Py is really good at.
Well, it's not that big a deal that Ren'Py can't make the distinction, and at least I saved myself a lot of frustrating trying by asking, didn't I?
I believe that ui.image should be able to take an im-constructed image as its first argument, and it also takes properties as arguments.
See, thats what I was talking about! Would have taken me ages to get the idea to try this (might be a good idea to add it to the manual...).
But a single sentence from the creator, and I saved myself (again) a lot of work. :)

PS: Well yes, right now what I have is basically an image viewer. And I don't know why Ren'Py shouldn't be good at it. It has all the necessary pieces.
But the funny thing is, that you can gradually expand the "image viewer" into a kinetic novel, using the renpy.has_label function to realise custom effects for the images. No, I won't be doing that. Just saying that it is possible in general, and that with that, you are exactly at the audience Ren'Py is aimed at...
If you are a debian linux user, take a look at my program: http://deb-install.sourceforge.net/

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#17 Post by Icekiss »

PyTom wrote: I believe that ui.image should be able to take an im-constructed image as its first argument, and it also takes properties as arguments.
It might take properties, but apparently, it doesn't take positional properties.

This code line:

Code: Select all

ui.image( im.Image(file), xpos=0.0, xanchor='center', ypos=0.5, yanchor='center' )
will display the image at the bottom af the screen, centered in xdirection. :(
If you are a debian linux user, take a look at my program: http://deb-install.sourceforge.net/

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#18 Post by Icekiss »

Arrggh... Konqueror crashed on me before I could post my reply. Not funny at all!

So here's the abbreviated version:

Thanks a lot for the fixes! They will make working with images easier. :D

ui.image takes positional properties when given a filename, and not an image object.
I can't think of any other rule for this that makes sense, at least for the type of games Ren'Py is aimed at.
If, which I suspect, you determine the names of the statements at compile time, the best solution I can think of is adding a qualifier "dynamic" ( or maybe "changing") to the python statement (so you'd write "python dynamic:" or "python hide dynamic:"), which gives a special name to that python block.
And whenever Ren'Py encounters a statement with that name, it considers the statement to have changed.

Should I be wrong, and the names are determined at runtime, then you could let checkpoint() take a string as parameter (which sets the name of the python block), and provide a much more flexible solution.

Just tossing ideas since you said you couldn't think of a rule. Not a big deal that I can skip unseen pictures...

EDIT: The compile time solution would in my case be equivalent to turn skipping off completely, so there's no reason at all to implement it for my sake. But there are other scenarios, where it allows more flexibility than just deciding whether to turn skipping on or off.
If you are a debian linux user, take a look at my program: http://deb-install.sourceforge.net/

Post Reply

Who is online

Users browsing this forum: Bing [Bot]