Search found 60 matches

by laure44
Fri Oct 28, 2022 9:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Clicked hotspots on transparent images
Replies: 3
Views: 68

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: 44

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: 111

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: 168

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: 209

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: 230

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: 198

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: 218

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: 222

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: 285

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: 278

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: 330

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...
by laure44
Sun Sep 11, 2022 3:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Reposition text box temporarily?
Replies: 6
Views: 290

Re: Reposition text box temporarily?

Semicolonkid wrote:
Sun Sep 11, 2022 3:11 pm
What am I missing here?
Pretty sure you can't use conditions in styles, which is why I used it in the say screen directly
by laure44
Sun Sep 11, 2022 2:47 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Reposition text box temporarily?
Replies: 6
Views: 290

Re: Reposition text box temporarily?

Here's one simple way: default textbox_top = False # in your say screen, find the window line and add the condition. window: id "window" if textbox_top: yalign 0.0 ## label start: "Bottom." $textbox_top = True "Top." $textbox_top = False "Bottom again."