Search found 1415 matches

by xavimat
Wed Jul 31, 2019 9:59 am
Forum: Ren'Py Questions and Announcements
Topic: Language chooser loop error
Replies: 4
Views: 271

Re: Language chooser loop error

The "change language" function already restarts renpy (or something like that). It's possible that your lines after the menu are not executed. Be sure to change the persistent variable immediately before the change_language but not before the menu: if not persistent.lang_check: menu: "English": $ pe...
by xavimat
Wed Jul 31, 2019 9:47 am
Forum: Ren'Py Questions and Announcements
Topic: Jump to variable determined label?
Replies: 10
Views: 1971

Re: Jump to variable determined label?

You can add zfill to Alex's answer to add zeros to the left (in your post your labels have zeros):

Code: Select all

$ rand = str(renpy.random.randint(0, 13)).zfill(2)
Also, IMHO using"join" it's too much to join two simple strings. I'd use +

Code: Select all

jump expression "bla" + rand
by xavimat
Sun Jul 14, 2019 10:09 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Defining and calling custom functions in game and screens
Replies: 6
Views: 349

Re: defining and calling custom functions in game and screens

Creator defined statements are too advanced stuff for this, relatively simple, question. I haven't understood exactly what you need. But I guess some of these can be useful for you: 1. You can use labels and call them to repeat some renpy code. Labels will behave similar to functions. You can pass a...
by xavimat
Wed Jul 10, 2019 11:32 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Any example for creating a battle log on the screen?
Replies: 4
Views: 277

Re: Any example for creating a battle log on the screen?

You can try this (not tested): default histo = [] init python: def log(txt): histo.append(txt) renpy.hide_screen("myhistory") renpy.show_screen("myhistory") screen myhistory(): viewport: mousewheel True draggable True scrollbars "vertical" yinitial 1.0 vbox: null height 10 for i in histo: text i lab...
by xavimat
Mon Jul 08, 2019 5:36 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] "If statement" + adding imagebutton to a screen?
Replies: 2
Views: 286

Re: "If statement" + adding imagebutton to a screen?

You can use "if" inside a screen. With a boolean variable it should be easy: default has_phone = False screen somescreen(): vbox: textbutton "Some button" action NullAction() if has_phone: # <-- You can use "if" here. textbutton "Phone" action NullAction() label start: show screen somescreen menu: "...
by xavimat
Fri Jun 28, 2019 10:58 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] Apply zorder to image?
Replies: 5
Views: 362

Re: apply zorder to image?

Have you tried this?

Code: Select all

show myimagewithprimadonnacomplex zorder 999
https://www.renpy.org/doc/html/displayi ... ght=zorder

EDIT (it doesn't):
Never tried this, maybe it works:
image primadona:
"primadonna.png"
zorder 999
by xavimat
Fri Jun 28, 2019 8:57 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Default image not found?
Replies: 7
Views: 414

Re: Default image not found?

The line show bedroomgame can't work because bedroomgame is not an image.
Use:

Code: Select all

show expression bedroomgame
and tell us what error are you getting.
You are using the name "drag" for another screen, but the word "drag" is used inside renpy. Maybe that's conflicting something.
by xavimat
Fri Jun 28, 2019 6:37 am
Forum: Ren'Py Questions and Announcements
Topic: How to set up a layered image map
Replies: 3
Views: 384

Re: How to set up a layered image map

You can use the action SensitiveIf() to control which hotspots are active and which ones are disabled: https://www.renpy.org/doc/html/screen_actions.html#SensitiveIf default var = 1 screen test5(): imagemap: ground Solid("#880", xysize=(310,110)) idle Solid("#ff0", xysize=(310,110)) hover Solid("#80...
by xavimat
Fri Jun 28, 2019 5:55 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Default image not found?
Replies: 7
Views: 414

Re: Default image not found?

In your code, the name of the image is tv1 . But television is a variable that contains the string "tv1" (that's a simple string, not the image itself). In your screen: the line add "television" is telling renpy to add the image named television but there is no such image. Try without the quotes: ad...
by xavimat
Wed Jun 26, 2019 9:05 am
Forum: Creator Discussion
Topic: A multiplayer visual novel/dating sim
Replies: 6
Views: 1293

Re: A multiplayer visual novel/dating sim

Three years later, there are any new ideas on this? I'm interested.
by xavimat
Fri Jun 21, 2019 10:21 am
Forum: Ren'Py Questions and Announcements
Topic: How to flip images?
Replies: 7
Views: 591

Re: How to flip images?

For the very, very fussy: Note that flipping the image of a person that has clothes with buttons on it will change the normal orientation of the buttons. (or has a scar,a tattoo, or a single earring, or any non-symmetrical feature). I'd never thought about it until an artist pointed it out in this f...
by xavimat
Fri Jun 21, 2019 5:11 am
Forum: Ren'Py Questions and Announcements
Topic: Creating an 'active' clock?
Replies: 3
Views: 536

Re: Creating an 'active' clock?

If I understand it correctly, you want a time counter running in the back independently of the actual story you are telling . It's doable, but I'd advise against it.The reason: every player has a different reading speed, your story will change according to that; I think it doesn't really make sense ...
by xavimat
Fri Jun 21, 2019 4:56 am
Forum: Ren'Py Questions and Announcements
Topic: Noob's question about a math game
Replies: 3
Views: 519

Re: Noob's question about a math game

Don't put the random and variables part inside an "init" block ("init" means that it will be executed only once, at init time).
Put the random and variables inside a label, and call that label every time you want fresh numbers.
by xavimat
Fri Jun 21, 2019 4:52 am
Forum: Ren'Py Cookbook
Topic: Affection Points
Replies: 21
Views: 14709

Re: Affection Points

Is there a way to max the affection points? So if I keep on adding affection and want to max it at 30 or 100 is there a way to do so? You can use the min() function. If you add points this way: $ points += 1 there is no max limit. If you add points this way: $ points = min(100, points + 1) it will ...
by xavimat
Fri Jun 21, 2019 4:50 am
Forum: Ren'Py Cookbook
Topic: Affection Points
Replies: 21
Views: 14709

Re: Affection Points

Yes, before your "label start:" type this: init -2 python: Player_affection = 0 max_affection= 100 This start with 0 points. And set max points to 100. You can change both values how you like. Sorry to correct you. Better use "default" to avoid problems with saves: default Player_affection = 0 defa...