Search found 286 matches

by RicharDann
Mon Jul 06, 2020 1:29 pm
Forum: Ren'Py Cookbook
Topic: Mark chosen choices
Replies: 2
Views: 1381

Re: Mark chosen choices

Pretty good, I was thinking on a really roundabout way to do this but it is actually so simple! Thank you for sharing this, you've saved me a lot of work.
by RicharDann
Mon Jul 06, 2020 1:14 pm
Forum: Ren'Py Questions and Announcements
Topic: Create a game top menu ERROR parsing script failed
Replies: 2
Views: 277

Re: Create a game top menu ERROR parsing script failed

You need to add the colon (:) at the end of your mapscreen definition.

Code: Select all

screen mapscreen: #<-- here
    add "images/map.png"
    imagebutton auto "images/map.png" action Return()
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: 495

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

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

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

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

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

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

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

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

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 &...
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: 653

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

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

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

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]"