Search found 777 matches

by hell_oh_world
Sun Sep 12, 2021 4:49 pm
Forum: Ren'Py Questions and Announcements
Topic: Can you incorpoate Kivy or pygame with renpy?
Replies: 4
Views: 501

Re: Can you incorpoate Kivy or pygame with renpy?

I'm not sure in what way do you want to incorporate pygame in renpy? Its already there, its just abstracted by renpy itself for the purpose of ease of use. If you're talking about blitting and stuff... CDD , through canvas, you can actually do some of pygame's drawing functions. You can do that in t...
by hell_oh_world
Sun Sep 12, 2021 7:05 am
Forum: Ren'Py Questions and Announcements
Topic: Can you incorpoate Kivy or pygame with renpy?
Replies: 4
Views: 501

Re: Can you incorpoate Kivy or pygame with renpy?

renpy is already running on top of pygame. kivy is a whole another engine used to make apps the most. and it also runs on top of pygame. your only choice is to pick from two of the engines. renpy has its advantage when it comes to games and VNs since its already pre-built like that. In kivy, you hav...
by hell_oh_world
Sat Sep 11, 2021 6:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] changing persistent variables in a function
Replies: 2
Views: 361

Re: changing persistent variables in a function

How are you calling this function?
If through the screen you need to use Function().

Code: Select all

screen test():
  button action Function(otherswitch, "off")
by hell_oh_world
Mon Sep 06, 2021 8:38 pm
Forum: Ren'Py Questions and Announcements
Topic: Optimize if-else statement
Replies: 4
Views: 465

Re: Optimize if-else statement

Suggestions: 1. Do you really need to have a screen for each card? If each card screen shares the same style etc. then you can use parameters in your screen instead... screen card(name, pic): vbox: text name add pic label start: if _return == "uno": call screen card("uno", "...
by hell_oh_world
Mon Sep 06, 2021 11:31 am
Forum: Ren'Py Questions and Announcements
Topic: Predefine .format strings (e.g. '{a1},{a2},{a3}'.format(arbitrarystringlist)?
Replies: 4
Views: 415

Re: Predefine .format strings (e.g. '{a1},{a2},{a3}'.format(arbitrarystringlist)?

Sadly you cannot add (+) dicts like tuples or list... In newer version of python you can simply do .format(**d1, **d2). However, renpy is still python 2.7. Your workaround is actually pretty neat. If I can suggest, you can probably make use of helper functions to simulate the "adding" of d...
by hell_oh_world
Mon Sep 06, 2021 7:32 am
Forum: Ren'Py Questions and Announcements
Topic: Predefine .format strings (e.g. '{a1},{a2},{a3}'.format(arbitrarystringlist)?
Replies: 4
Views: 415

Re: Predefine .format strings (e.g. '{a1},{a2},{a3}'.format(arbitrarystringlist)?

you can try to unpack the dict instead.

Code: Select all

>>> dict_ = dict(k1=1, k2=2, k3=3)
>>> template = "{k1} {k2} {k3}"
>>> template.format(**dict_)
"1 2 3"
This works if the dict has the necessary keys as you provided in your string format.
by hell_oh_world
Sun Sep 05, 2021 10:41 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] define animation inside python function
Replies: 4
Views: 422

Re: define animation inside python function

Adding to what Alex answered, I did something similar before...
viewtopic.php?p=540520#p540520
You can replace the frames with any displayable you want.
by hell_oh_world
Thu Sep 02, 2021 11:36 pm
Forum: Ren'Py Questions and Announcements
Topic: (SOLVED) [Bug?] Ren'Py overloading 16GB of RAM, invalid syntax
Replies: 4
Views: 423

Re: [Bug?] Ren'Py overloading 16GB of RAM, invalid syntax

Your condition always evaluates to True so your loop is infinite.
by hell_oh_world
Tue Aug 31, 2021 1:21 pm
Forum: Ren'Py Questions and Announcements
Topic: Custom Menu
Replies: 5
Views: 971

Re: Custom Menu

If your concern is to fit those 52 choices, then it's just a matter of styling the screen menu in your screens.rpy.
Try using viewports etc.
by hell_oh_world
Tue Aug 31, 2021 12:23 pm
Forum: Ren'Py Questions and Announcements
Topic: Getting a different object when clicking a button
Replies: 2
Views: 613

Re: Getting a different object when clicking a button

I don't understand the purpose of your add and drop functions in the class if you will not use those...

Code: Select all

action [Function(inventory.drop, buc), Function(inventory.add, buw), Play("sound", "audio/obt.mp3"), Notify(buw.noti)]
by hell_oh_world
Tue Aug 31, 2021 12:17 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Multiple variables in a single variable
Replies: 8
Views: 945

Re: Multiple variables in a single variable

Locks all objects when false That's supposed to happen. You're using the and logical operator here, meaning the condition will only evaluate to True if both left and right conditions are also True. https://cdn.educba.com/academy/wp-content/uploads/2019/09/Boolean-Operators-in-Python-1.2.png In othe...
by hell_oh_world
Mon Aug 30, 2021 11:33 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Multiple variables in a single variable
Replies: 8
Views: 945

Re: Multiple variables in a single variable

You almost got it right... default ucan_move = True default items_list = [ {"name":"uno", "child":"images/d.png", "x_pos":197, "y_pos":202, "can_move": True}, #starts as a true {"name":"dos", "child":...