Search found 378 matches

by IrinaLazareva
Sun Jul 12, 2020 10:41 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Conditional side image
Replies: 5
Views: 111

Re: Conditional side image

in init: default main_character = 'J.M.' define mc = Character('main_character', dynamic=True, image='mc', color='#ffbfff', ) image side mc = 'some_picture.jpg' in screen say(): if not renpy.variant("small"): if who==main_character: add SideImage() xalign .65 yalign .8 else: add SideImage() xalign ....
by IrinaLazareva
Fri Jul 10, 2020 6:45 am
Forum: Ren'Py Questions and Announcements
Topic: Problem with changing the icon
Replies: 2
Views: 103

Re: Problem with changing the icon

look this viewtopic.php?f=8&t=59067
PyTom wrote: The window icon and the icon.ico file are two different things - one controls in-game, and one controls before the game is launched.
by IrinaLazareva
Thu Jul 02, 2020 2:22 am
Forum: Ren'Py Questions and Announcements
Topic: Returning to menu with fewer options without loop
Replies: 1
Views: 141

Re: Returning to menu with fewer options without loop

There are several ways. The easiest: default stepone = False default steptwo = False default stepthree = False label start: # menu act: 'These are the activities!' 'step one' if not stepone: $ stepone = True "Let's....whatever" jump act 'step two' if not steptwo: $ steptwo = True # jump act 'step th...
by IrinaLazareva
Mon Jun 29, 2020 10:31 am
Forum: Ren'Py Questions and Announcements
Topic: Numbers problem
Replies: 3
Views: 185

Re: Numbers problem

$ money = 200 $ sayd = int(renpy.input("how much?", allow=['0','1','2','3','4','5','6','7','8','9']) or 0) ## at this step, you can enter a condition if you need it. Like: if sayd > 200: ... elif .. else). $ sum = money - sayd 'You say [sayd]? The rezult of operation is [sum]' https://docs.python.o...
by IrinaLazareva
Mon Mar 09, 2020 4:16 am
Forum: Ren'Py Questions and Announcements
Topic: "if" chose between 2 amount
Replies: 2
Views: 238

Re: "if" chose between 2 amount

Example with several code variants: label start: $ point = 10 if 0 < point < 30 or 60 < point < 100: "1-29 and 59-100" elif point >= 30 and point <= 60: "30-60" elif 200 > point >= 100: "100...199" elif point <= 0: "0 and less" else: "200 and more"
by IrinaLazareva
Wed Mar 04, 2020 2:48 pm
Forum: Ren'Py Questions and Announcements
Topic: How to add +1 to a variable every second
Replies: 4
Views: 247

Re: How to add +1 to a variable every second

default iron = 0 screen resources(): text "Iron: [iron]" at topleft timer 1.0 repeat True action SetVariable('iron', iron+1) label start: '?' show screen resources '!' The algorithm can be improved as you wish https://renpy.org/doc/html/screens.html#timer https://renpy.org/doc/html/screen_actions.h...
by IrinaLazareva
Mon Jan 13, 2020 9:35 am
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: ‘StoreModule’ object has no attribute ‘_history'
Replies: 6
Views: 327

Re: AttributeError: ‘StoreModule’ object has no attribute ‘_history”

It's hard to say without the code.
First, Check line 2363 of script.rpy (as well as the line above and the line below).
Also maybe you have variable with reserved name, for example, "extend"...
by IrinaLazareva
Mon Jan 06, 2020 12:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use "call" for multiple menu choices?
Replies: 11
Views: 585

Re: Can I use "call" for multiple menu choices?

I agree. I just wanted to mark an interesting psychological moment. When a function is not prescribed in the documentation, but you know about it, it becomes a pleasant feature (which doesn't show any flaws in it). But as soon as the function becomes documented, you start to make some demands to it ...
by IrinaLazareva
Sat Jan 04, 2020 8:22 am
Forum: Ren'Py Questions and Announcements
Topic: Can I use "call" for multiple menu choices?
Replies: 11
Views: 585

Re: Can I use "call" for multiple menu choices?

Ah! Good to know. Hmm, Maybe this feature was documented in vain... I was just thinking. It has a significant disadvantage. Set() creates many values with unique names that cannot be repeated . That is, this feature cannot be used in menus if the menu has the same answer choices. Here is an example...
by IrinaLazareva
Fri Jan 03, 2020 8:58 am
Forum: Ren'Py Questions and Announcements
Topic: Can I use "call" for multiple menu choices?
Replies: 11
Views: 585

Re: Can I use "call" for multiple menu choices?

philat wrote:
Fri Jan 03, 2020 4:16 am
You can also consider using the (undocumented) set feature.
By the way, this feature has now been documented
https://renpy.org/doc/html/menus.html#menu-set
by IrinaLazareva
Tue Dec 17, 2019 3:33 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Lower the volume of a sound effect?
Replies: 2
Views: 401

Re: Lower the volume of a sound effect?

You can create a separate channel init python: renpy.music.register_channel('mychanel') and then adjust the sound using the function: $ renpy.music.set_volume(.5, channel='mychanel') https://renpy.org/doc/html/audio.html#renpy.music.register_channel https://renpy.org/doc/html/audio.html#renpy.music....
by IrinaLazareva
Sun Dec 08, 2019 11:46 am
Forum: Ren'Py Questions and Announcements
Topic: Display text with specific position and style
Replies: 11
Views: 426

Re: Display text with specific position and style

The code works perfectly, but there is a black box background behind my text and I cannot find how to change the font style. Do you know how could I remove the black background and change the font style of the text ? "black box" refers to an frame element. If it is not needed, it can be removed. An...
by IrinaLazareva
Sun Dec 08, 2019 8:59 am
Forum: Ren'Py Questions and Announcements
Topic: Display text with specific position and style
Replies: 11
Views: 426

Re: Display text with specific position and style

define e = Character('Eileen', color="#c8ffc8") # Le jeu commence ici label start: screen text_example(): frame: xalign 0.5 ypos 50 text "Text tags {color=#c8ffc8}work{/color} in screens.": size 30 e "This is a test" return The screen is a function. It is written outside the label start (like all v...
by IrinaLazareva
Sun Dec 08, 2019 8:45 am
Forum: Ren'Py Questions and Announcements
Topic: Second question to confirm the first answer
Replies: 6
Views: 348

Re: Second question to confirm the first answer

And if the player answer "no" to the second question, then go back to the first question again . The menu object can have its own tags that can be jumped on: label start: 'begin' menu my_choice: e "What do you want to do?" "Stay": pass "Leave": menu: e "Are you sure you want to quit?" "Yes": return...
by IrinaLazareva
Mon Oct 21, 2019 7:15 pm
Forum: Ren'Py Questions and Announcements
Topic: Random number generator with blacklisted numbers
Replies: 3
Views: 385

Re: Random number generator with blacklisted numbers

Bentley-Sama wrote:
Mon Oct 21, 2019 11:39 am
Someone entertained the idea of using random.sample() but I don't know where to start with that idea

Code: Select all

    $ random1, random2 = renpy.random.sample([1, 2, 3, 4], 2)