Search found 676 matches

by hell_oh_world
Sun Mar 28, 2021 9:06 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to update my instance variable using functions/methods?
Replies: 2
Views: 579

Re: how to update my instance variable using functions/methods?

Code: Select all

init python:
  class Quest:
    def __init__(self, active=False):
      self.active = active
    
    def activate(self):  self.active = True

default q1 = Quest()

label start:
  $ q1.activate()
by hell_oh_world
Wed Mar 17, 2021 8:16 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Say Function (in Screen) Bug
Replies: 7
Views: 366

Re: Say Function (in Screen) Bug

you can try this.

Code: Select all

define mc = Character("Jake")

label start:
  python:
    renpy.say(mc, "", interact=False)
    name = renpy.input("What's your name?").strip()
This works, but you might need to adjust the screen `input` in `screens.rpy` and add a `background None` to the `window` container.
by hell_oh_world
Wed Mar 17, 2021 10:01 am
Forum: Ren'Py Questions and Announcements
Topic: Skip Language selection in Splashscreen
Replies: 4
Views: 298

Re: Skip Language selection in Splashscreen

It's a sample implementation, after all, it doesn't suppose to reflect a direct answer to the question using your example. But its very much the same.
You'll just have to replace these textbuttons with your imagebuttons, and use the actions I used in this example in your imagebuttons' actions.
by hell_oh_world
Wed Mar 17, 2021 7:59 am
Forum: Ren'Py Questions and Announcements
Topic: Skip Language selection in Splashscreen
Replies: 4
Views: 298

Re: Skip Language selection in Splashscreen

what is this action for though `SetField(persistent, "_language", "russian")`? also, why do you have them on separate screens? you can just make one screen and put all of them in there. Use hbox, vbox to align them horizontally or vertically. Sample implementation: default persistent.language_select...
by hell_oh_world
Fri Mar 12, 2021 6:17 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Shortening ATL Code
Replies: 4
Views: 219

Re: Shortening ATL Code

Or can you use Movie() without covering the background? Yes, just make sure your movie file supports transparency, if it's rendered opaque, you can use the Movie displayable's mask parameter and pass another movie file that contains the black and white areas of the original movie. Black would repre...
by hell_oh_world
Fri Mar 12, 2021 6:09 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Shortening ATL Code
Replies: 4
Views: 219

Re: Shortening ATL Code

Shortest answer: Make it a movie instead. and use the Movie() displayable. Another possible way: init python: def animation(st, at, frames=[], interval=None): frame_count = len(frames) if interval is None: interval = 1 / float(frame_count) return frames[int((st // interval) % frame_count)], interval...
by hell_oh_world
Tue Mar 09, 2021 6:05 pm
Forum: Ren'Py Questions and Announcements
Topic: How can you make a playlist based on file names?
Replies: 5
Views: 235

Re: How can you make a playlist based on file names?

Yeah... My bad. Maybe try adding this before the `all(...)` part.

Code: Select all

if len(parts) == 4 and all(...):
by hell_oh_world
Tue Mar 09, 2021 6:50 am
Forum: Ren'Py Questions and Announcements
Topic: How can you make a playlist based on file names?
Replies: 5
Views: 235

Re: How can you make a playlist based on file names?

init python hide: store.playlists = {} exts = ["mp3", "ogg"] for f in renpy.list_files(): parts = f.split("/") if all((parts[0] == "audios", parts[1] == "playlists")): print("passed1") playlist_name, music_name = parts[2:] music_ext = music_name.rsplit(".", 1)[-1] if any(music_ext == ext for ext in...
by hell_oh_world
Mon Mar 08, 2021 7:09 pm
Forum: Ren'Py Questions and Announcements
Topic: trouble with lists
Replies: 1
Views: 221

Re: trouble with lists

I'm trying to figure out what the code does, but I guess, I just can't. Here are some few pointers that might make your code and post more understandable. 1. Follow a certain naming convention . I observed that you're using PascalCase for some of your variables, which is not bad, but the other varia...
by hell_oh_world
Sun Mar 07, 2021 6:45 am
Forum: Ren'Py Questions and Announcements
Topic: any idea, suggestion on making a highscore on main menu?
Replies: 11
Views: 339

Re: any idea, suggestion on making a highscore on main menu?

init python: def addHighScore(name, score): sindex = None for index, (name_, score_) in enumerate(persistent.highscores): if name == name_: sindex = index break if sindex is not None: persistent.highscores[sindex][1] = score else: persistent.highscores.append([name, score]) Add this in your code, t...
by hell_oh_world
Sat Mar 06, 2021 1:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Execute two actions in parallel
Replies: 1
Views: 207

Re: Execute two actions in parallel

Hopefully, I understood it correctly. renpy.say will cause an interaction, so in that line you'll actually need to click before seeing what will be shown by renpy.show. I suggest doing renpy.say as the last part of your function then. Or probably, leave it like that but pass interact=False in renpy....
by hell_oh_world
Sat Mar 06, 2021 1:39 pm
Forum: Ren'Py Questions and Announcements
Topic: any idea, suggestion on making a highscore on main menu?
Replies: 11
Views: 339

Re: any idea, suggestion on making a highscore on main menu?

Like label s, screen s should be put at 0 level of indentation. So screen s should be outside label s and be of the same level as label statements. default persistent.highscores = [] screen highscores(): # uncomment the tag menu if this will be part of the main menu/game menu # tag menu vbox: for pl...
by hell_oh_world
Fri Mar 05, 2021 2:45 pm
Forum: Ren'Py Questions and Announcements
Topic: I made a routes analyser - visualise your project with a graph!
Replies: 10
Views: 482

Re: I made a routes analyser - visualise your project with a graph!

Wrong section though. Even if you have those questions still the thread shouldn't be placed here.
Thanks for sharing anyways.
by hell_oh_world
Wed Mar 03, 2021 8:39 am
Forum: Ren'Py Questions and Announcements
Topic: Renpy/game design dilemma
Replies: 6
Views: 453

Re: Renpy/game design dilemma

i would have it like have a single variable that contains the day (number) and a single variable too that contains the location (can be a string) a quick example would be... default day = 0 default location = "home" screen navigator(): hbox: textbutton "Advance Time" action Return((location, day + 1...