Search found 239 matches

by RicharDann
Fri Apr 03, 2020 11:36 am
Forum: Ren'Py Questions and Announcements
Topic: How can I make my character talk, inside a screen?
Replies: 5
Views: 257

Re: How can I make my character talk, inside a screen?

To use Show(), you need to pass the screen name as a string, then an optional transition argument, and then arguments or keyword for that screen separately. See here.

Code: Select all

Show("say", who=" ", what="Now I'll be able to open the door")
by RicharDann
Fri Apr 03, 2020 9:01 am
Forum: Ren'Py Questions and Announcements
Topic: Only repeat part of a transform ATL help [solved]
Replies: 4
Views: 257

Re: Only repeat part of a transform ATL help

I think you don't need two block statements, or even one. The parallel statement works kinda same as block, only they begin at the exact same time and run at unison. So try: transform fog_effect_2: # won't repeat alpha 0.0 xoffset -1920 pause 1.0 parallel: #repeats linear 1.5 alpha 0.15 linear 1.5 a...
by RicharDann
Mon Mar 23, 2020 8:09 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Notify transition
Replies: 2
Views: 193

Re: Notify transition

Try changing the position, yalign (or maybe yoffset) on the same linear statement you change the alpha on hide:

Code: Select all

on hide:
    linear .5 yalign -0.1 alpha 0.0
by RicharDann
Fri Mar 20, 2020 10:29 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Openning local html file in browser
Replies: 2
Views: 189

Re: Openning local html file in browser

If you're running the game from the Ren'Py Launcher, try copying wiki.html to your renpy-sdk folder (from where you run renpy.exe) and see if that works.
I think it uses the folder from where the game was executed to determine the url path.
by RicharDann
Wed Mar 18, 2020 8:19 am
Forum: Ren'Py Questions and Announcements
Topic: Open .txt file with imagebutton or textbutton
Replies: 1
Views: 184

Re: Open .txt file with imagebutton or textbutton

There isn't a function that explicitly does this unless you create one yourself, but there's the OpenURL() action that can open a web page or an html file in the browser.

You could use an html file instead of txt (though a plain txt might also work), and set it to the button as a local url.
by RicharDann
Tue Mar 17, 2020 1:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Renpy replay not using variables
Replies: 1
Views: 190

Re: Renpy replay not using variables

This is the first time I actually try out this code so this may not be the perfect solution, but according to the documentation here , you have to pass each variable and value pair as a dictionary, using the 'scope' keyword argument, either with the Replay() action or with renpy.call_replay() functi...
by RicharDann
Sat Mar 14, 2020 2:15 pm
Forum: Ren'Py Questions and Announcements
Topic: Displaying Class Variable In Screen
Replies: 4
Views: 222

Re: Displaying Class Variable In Screen

Try using format() method instead:

Code: Select all

text "{}".format(x.description)
You may have to change it in the class as well.
by RicharDann
Fri Mar 06, 2020 8:48 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] UnboundLocalError: local variable 'vllager' referenced before assignment
Replies: 2
Views: 214

Re: UnboundLocalError: local variable 'vllager' referenced before assignment

You need to use global statement to let Ren'Py know you want to modify a global variable (created with default): default villager = 0 init python: def creat_villager(): global villager # <--- access the variable if food >= 10: villager += 1 Otherwise the function will treat villager as a local varia...
by RicharDann
Mon Mar 02, 2020 11:58 am
Forum: Ren'Py Questions and Announcements
Topic: "Possible infinite loop" error on choice menu?
Replies: 2
Views: 212

Re: "Possible infinite loop" error on choice menu?

The if statement is likely causing the problem. But do you really need it? If you do something like this in all three labels: label explore_school_grounds: "I'll explore the school for a bit." jump choice1 And add the jump to the next scene right after the menu: menu choice1: set menuset "Where shou...
by RicharDann
Mon Mar 02, 2020 9:10 am
Forum: Ren'Py Questions and Announcements
Topic: Having issues with hovering over an imagebutton, please help!
Replies: 6
Views: 324

Re: Having issues with hovering over an imagebutton, please help!

I'm not sure what are you trying to achieve here, but if all you need is to show a small message when a button is hovered in a screen, and have it go away when unhovered, you might want to try using tooltips.
by RicharDann
Wed Feb 26, 2020 11:53 am
Forum: Ren'Py Questions and Announcements
Topic: Different random after scroll back
Replies: 12
Views: 518

Re: Different random after scroll back

As I now think about it more carefully, disabling the ability to save and load the game is not a very user-friendly thing to do. It is technically possible to make the save and load buttons insensitive (unclickable) with some boolean variables for example, but many will find it annoying. A clever pl...
by RicharDann
Tue Feb 25, 2020 2:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Different random after scroll back
Replies: 12
Views: 518

Re: Different random after scroll back

Alex makes a very good point. Another option could be to disable rollback, saving and loading, but ONLY during roulette or random element sections, and re-enable them once the casino label or screen is exited. If you do this make sure to warn the players beforehand so they know exactly how it works....
by RicharDann
Tue Feb 25, 2020 1:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Different random after scroll back
Replies: 12
Views: 518

Re: Different random after scroll back

It's because you're using renpy.random, wich is made to support rollback. You can just use plain random module:

Code: Select all

    "Roulette spining"
    
    python:
        
        import random

        rlt_drop = random.randint(0, 37)

    "It's a [rlt_drop]"
by RicharDann
Mon Feb 24, 2020 10:45 am
Forum: Ren'Py Questions and Announcements
Topic: Managing save slots
Replies: 1
Views: 267

Re: Managing save slots

For the first problem, when using or checking the value of persistent variables, you need to include persistent before their name: if not persistent.hardcoreMode: # show save pages For the second problem, you could use 'on show' statement to force the game to show a particular page (unsure if this w...
by RicharDann
Mon Feb 24, 2020 9:02 am
Forum: Ren'Py Questions and Announcements
Topic: Specifying variable image file in blur
Replies: 4
Views: 348

Re: Specifying variable image file in blur

Is there any way to incorporate the 'location' variable into the expression you've come up with at all? If I'm understanding this question correctly, you want to specify the location using a variable? You can just use the variable itself as parameter: $ current_location = "bedroom" scene expression...