Search found 114 matches
- Fri Sep 16, 2022 9:45 am
- Forum: Ren'Py Questions and Announcements
- Topic: Help with color variable
- Replies: 13
- Views: 359
Re: Help with color variable
I tested the code and it works. Perhaps trying to retype everything and not copy pasting it would solve the inconsistent characters etc. What I mean by that is make sure your code is properly indented, and indented with space not tabs. In short, type it by hand. I re-edited the code in my last post,...
- Fri Sep 16, 2022 8:26 am
- Forum: Ren'Py Questions and Announcements
- Topic: Help with color variable
- Replies: 13
- Views: 359
Re: Help with color variable
I just realized you were talking about a coloring a certain text in the dialogue instead of the say name above the dialogue. Well that will not really work. You need to use text tags to achieve that. You can store the colored string in a variable and use that differently from the Character object. l...
- Fri Sep 16, 2022 6:13 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] Apply a transform through a screen action?
- Replies: 2
- Views: 319
Re: Apply a transform through a screen action?
Use variables.
Code: Select all
transform move_to_center(duration=1.0):
ease duration xpos 0.5
screen test_screen():
default move = None
add "images/Ball.png" at move
textbutton "Move Ball to Center" action SetScreenVariable("move", move_to_center)
label start:
call screen test_screen
- Thu Sep 15, 2022 11:30 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Help with color variable
- Replies: 13
- Views: 359
Re: Help with color variable
Try... label start: python: fo = renpy.input("How do you want to call her? If empty, she will be 'Foxy'.").strip() props = dict(name=fo or "Foxy") if colorednames: props.update(color="#F38219", who_color ="#F38219") fo = Character(**props) fo "Hi, my name is [fo]!"
- Tue Sep 13, 2022 12:13 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to disable hover_sound of a textbutton on a specific screen?
- Replies: 4
- Views: 428
Re: How to disable hover_sound of a textbutton on a specific screen?
I'm still wondering if there'd be some way to automate this more without the need to write that code for every similar navigation button in the game, because there is clearly some kind of automation already in place for the hover colour in similar situations. You can also use screens. screen nav_bt...
- Mon Sep 05, 2022 6:51 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] Setting a class via button?
- Replies: 2
- Views: 340
Re: Setting a class via button?
Default your variables to avoid undefined errors. # Party Members default player = None default player2 = None default player3 = None # Individual Party Member Stats default wren = character_class("Wren", 1, 0, 20, 20, 30, 30) default arden = character_class("Arden", 1, 0, 30, 30, 10, 10) default ch...
- Mon Sep 05, 2022 1:24 am
- Forum: Ren'Py Questions and Announcements
- Topic: Running a function from within dialogue
- Replies: 3
- Views: 314
Re: Running a function from within dialogue
Ren'Py's way of interpolation really has its flaws. You can try a workaround using renpy.say which is a pythonic equivalent of a say statement. $ renpy.say(e, "It's {} [unknown_string]".format(a_or_an(unknown_string))) # or for the latest version of Ren'Py, using f strings $ renpy.say(e, f"It's {a_o...
- Sun Sep 04, 2022 10:58 am
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved]Inserting a variable into a variable
- Replies: 2
- Views: 244
Re: Inserting a variable into a variable
Code: Select all
text "[char_name.affection]" style "ultd"
Code: Select all
use screen card_text(..., ava_stats)
- Sun Sep 04, 2022 3:41 am
- Forum: Ren'Py Questions and Announcements
- Topic: Bind coordinates to screenshot thumbnail
- Replies: 6
- Views: 385
Re: Bind coordinates to screenshot thumbnail
How about trying to create a new save and see if your current code works when hovering that new save?
- Sun Sep 04, 2022 3:26 am
- Forum: Ren'Py Questions and Announcements
- Topic: Bind coordinates to screenshot thumbnail
- Replies: 6
- Views: 385
Re: Bind coordinates to screenshot thumbnail
Its probably because of your condition that makes the screenshot not to show. I suggest removing the condition for the screenshot since FileScreenshot already handles empty slots with a Null displayable. FileScreenshot(name, empty=None, page=None, slot=False) Returns the screenshot associated with t...
- Sat Sep 03, 2022 11:56 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Bind coordinates to screenshot thumbnail
- Replies: 6
- Views: 385
Re: Bind coordinates to screenshot thumbnail
Try to use a screen variable to store the slot number when hover event using SetScreenVariable.
Then add the thumbnail FileScreenshot using the stored slot number and place it outside the loop.
Then add the thumbnail FileScreenshot using the stored slot number and place it outside the loop.
- Sat Sep 03, 2022 4:48 am
- Forum: Ren'Py Questions and Announcements
- Topic: Using a function with text
- Replies: 4
- Views: 248
Re: Using a function with text
You can utilize screen's use statement. screen girl(**kwargs): text "Affection: " style "ultd": xanchor 1.0 properties kwargs text "[Ava_stats.affection]" style "ultd": xanchor 0 properties kwargs screen test(): use girl(xpos=200, ypos=650) A few notes. text "Affection: " style "ultd" and stuff that...
- Thu Sep 01, 2022 7:10 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Loading new images from disk while game is running
- Replies: 5
- Views: 295
Re: Loading new images from disk while game is running
How about saving/downloading the image file in the config.savedir or %appdata% path, then load it as a path file?
Code: Select all
init python:
APPDATA = config.savedir.replace("\\", "/")
screen test():
add "{}/test.png".format(APPDATA)
- Thu Sep 01, 2022 3:49 am
- Forum: Ren'Py Questions and Announcements
- Topic: Returning to Screen from Called Label
- Replies: 4
- Views: 278
Re: Returning to Screen from Called Label
Try using Start instead of Call.
- Wed Aug 31, 2022 1:06 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] deactivating screen button...
- Replies: 3
- Views: 285
Re: deactivating screen button...
screen select_girl: $select_girl_active = True Never modify global variables inside a screen using $ or python:. Screen is a live display the re-runs its code multiple times to update the display. In your label, you can just set the variable to True before the "call screen line" to achieve what you...