Search found 63 matches

by laure44
Mon Dec 05, 2022 7:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Live2D character as an animated side image
Replies: 7
Views: 138

Re: Live2D character as an animated side image

Not sure what's wrong here, because I tried making a Live2D side image and it did work. Or maybe I didn't understand the question right... define char = Character('Me', image="charimage") image side charimage = Live2D("images/char/char.model3.json", loop=True) label start: char motion "..." char eye...
by laure44
Mon Nov 07, 2022 12:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Making a stackable bar with two colors
Replies: 2
Views: 282

Re: Making a stackable bar with two colors

You could stack two bars inside a fixed. The first bar would be the total amount of points, and the one overlapping would be the base value. The overlapping bar shouldn't have a background so that you can see the other bar under it. Quick example: default value_base = 50 default value_item_A = 5 def...
by laure44
Fri Oct 28, 2022 9:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Clicked hotspots on transparent images
Replies: 3
Views: 246

Re: Clicked hotspots on transparent images

The alpha property used by imagemaps is set on True by default, but you can set it to False.

(You can check all the properties in the documentation https://www.renpy.org/doc/html/screens. ... p#imagemap )

Code: Select all

imagemap:
    alpha False
by laure44
Fri Oct 28, 2022 7:02 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Can I implement ConditionSwitch into ground of Imagemap?
Replies: 2
Views: 220

Re: Can I implement ConditionSwitch into ground of Imagemap?

You can simply use the name of the image you defined, inside quotes.

Code: Select all

ground "something"
by laure44
Sun Oct 23, 2022 1:46 pm
Forum: Ren'Py Questions and Announcements
Topic: Showing More Menu Options based on Persistant Data
Replies: 1
Views: 269

Re: Showing More Menu Options based on Persistant Data

Code: Select all

    menu:
        "Who should I see...?"
        "Emily" if persistent.emily:
            jump LB_Emily_After
        "Toto" if persistent.toto:
            jump LB_Toto_After
        "Mia" if persistent.mia:
            jump LB_Mia_After
Careful though, it is 'persistent', not 'persistant'. :)
by laure44
Sun Oct 16, 2022 8:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Is it possible to make a variable passed to a function global inside the function?
Replies: 1
Views: 282

Re: Is it possible to make a variable passed to a function global inside the function?

I'm not even sure that's possible, but it would probably be safer to just use return.

Code: Select all

def my_func(x):
    return x + 1

money = my_func(money)
by laure44
Sat Oct 08, 2022 1:11 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Change viewport's background collor.
Replies: 2
Views: 311

Re: Change viewport's background collor.

You can use the background property for your frame. It takes a displayable, so you can use Solid to change the background color. https://www.renpy.org/doc/html/style_properties.html#style-property-background Here's an example: frame: background Solid("#000") I suppose the reason why your frame is wh...
by laure44
Fri Oct 07, 2022 9:02 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] imagebutton to pick different screens depending on variable
Replies: 2
Views: 336

Re: imagebutton to pick different screens depending on variable

Use == for comparison, without the quotes.

Code: Select all

action SetVariable("drink1_ingredients", drink1_ingredients + 1), If(drink1_ingredients == 1, Show("milk1")), If(drink1_ingredients == 2, Show("milk2")), If(drink1_ingredients == 3, Show("milk3"))
by laure44
Wed Oct 05, 2022 2:51 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Displaying vertical image with movement
Replies: 2
Views: 289

Re: Displaying vertical image with movement

You can easily do that with the camera statement. label start: camera: xalign 0.5 zoom 0.5 # adapt this zoom value to make sure the width of the image fully shows yalign 1.0 # 1.0 means that the camera will be aligned at the bottom of the screen linear 2 yalign 0.0 # it will take 2 seconds to go to ...
by laure44
Tue Oct 04, 2022 2:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Bar sound in the Settings menu
Replies: 2
Views: 306

Re: Bar sound in the Settings menu

You can't use activate_sound and hover_sound for bars (or for vbox like in your exemple), however you can do something like this:

Code: Select all

bar:
    value Preference("music volume") #at bar_transform
    released Play("sound", "sound/se/se_02.ogg")
    hovered Play("sound", "sound/se/se_01.ogg")
by laure44
Sun Sep 25, 2022 6:10 pm
Forum: Ren'Py Questions and Announcements
Topic: Centering text inside a frame [solved]
Replies: 2
Views: 265

Re: Centering text inside a frame

You can also use fixed.

Code: Select all

fixed fit_first True:
    add "an image"
    text "a text"
by laure44
Mon Sep 19, 2022 1:05 am
Forum: Ren'Py Questions and Announcements
Topic: (solved) About rounding numbers
Replies: 2
Views: 297

Re: About rounding numbers

Doeny wrote:
Mon Sep 19, 2022 12:28 am
Hi, I need help with rounding numbers to hundredth part/2nd space after comma. Can i do it in a simple way or do I have to write an individual code for that?

Code: Select all

round(num,2)
by laure44
Tue Sep 13, 2022 7:11 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Premade gallery broken with switch to Ren'Py 8.0+
Replies: 2
Views: 285

Re: Premade gallery broken with switch to Ren'Py 8.0+

for num in range(pages): Your variable 'pages' is probably a float, hence the error. Make sure it is an integer first. Or if needed, you can convert it to an integer like this: init python: import math math.floor(pages) # rounds down math.ceil(pages) # rounds up # OR int(pages) # is also an option ...
by laure44
Tue Sep 13, 2022 10:35 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with creating a dev tool for camera panning and zooming
Replies: 4
Views: 346

Re: Help with creating a dev tool for camera panning and zooming

I have absolutely no idea what's going on to be honest, so I've messed with your code a little and tried another way to achieve what you need. You don't need to press a button to see the result anymore and I've also added a Copy button to copy the camera statement to the clipboard. default camera_zo...