Search found 849 matches

by Ocelot
Sun May 20, 2018 11:19 am
Forum: Ren'Py Questions and Announcements
Topic: Constantly getting "Line is indented" error
Replies: 17
Views: 1020

Re: Constantly getting "Line is indented" error

Second: $ day = 0: max = 7 Is cpimpletely incorrect. Python statements do not introduce block. Correct: $ day = 0 $ max = 7 # Or python: day = 0 max = 7 First: The dialogue and menu: statement should have same level of identation: there is no new block introduced there.
by Ocelot
Sun May 20, 2018 11:12 am
Forum: Ren'Py Questions and Announcements
Topic: Expected Statement Error [SOLVED]
Replies: 3
Views: 196

Re: Expected Statement Error

elif has no corresponding if statement:
https://i.imgur.com/FnMsGzb.png
I think, you intended those two lines to be executed only if result equal to "paper". To do so, make sure identation is consistent to other actions in if-block
by Ocelot
Sun May 20, 2018 10:11 am
Forum: Ren'Py Questions and Announcements
Topic: Constantly getting "Line is indented" error
Replies: 17
Views: 1020

Re: Constantly getting "Line is indented" error

Strictly speaking, four spaces is a style requirement. Only hard limit is that blocks should be consistent (all lines in same block has same indent, new blocks are indented deeper than previous.) You can have 1-space indent, then next block — 1 space, 3 tabs → next 1 space, 3 tabs, 5 spaces → back t...
by Ocelot
Sun May 20, 2018 2:01 am
Forum: Ren'Py Questions and Announcements
Topic: Constantly getting "Line is indented" error
Replies: 17
Views: 1020

Re: Constantly getting "Line is indented" error

In Python (and, by extention, in RenPy), a block is a series of statements, logically executed sequentally. They should be written in neat columns: https://i.imgur.com/rwPOz6P.png https://i.imgur.com/YbvGMBL.png A new block is introduced by increasing indentation level (moving start of the line furt...
by Ocelot
Sat May 19, 2018 4:28 am
Forum: Ren'Py Questions and Announcements
Topic: H button only hide text and not screen
Replies: 2
Views: 395

Re: H button only hide text and not screen

You need to show (or call) your screen on layer different from "screens". You can do it by using semi-hidden _layer keyword argument: https://www.renpy.org/doc/html/screen_python.html?highlight=_layer#renpy.show_screen $ renpy.show_screen("my_screen", _layer="master") # You cannot hide it usual way,...
by Ocelot
Sat May 19, 2018 3:10 am
Forum: Ren'Py Questions and Announcements
Topic: Screen Conflicts
Replies: 1
Views: 145

Re: Screen Conflicts

1) Change z-order, so your inventory screen would be higher than navigation. zorder 1
2) Make it modal: no other screens can interacted with if modal is present. modal True
by Ocelot
Thu May 17, 2018 1:37 pm
Forum: Ren'Py Questions and Announcements
Topic: How to change the default renpy exception screen
Replies: 2
Views: 390

Re: How to change the default renpy exception screen

You edit RenPy source. This is the only way. Exception handling screen is not a part of the game and is not configurable. It intention is only to report an error and give traceback to aid in fixing the cause. It is not intended to be changed, because it is the last resort: if you see this screen, it...
by Ocelot
Wed May 16, 2018 12:14 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Music player not refreshes playing song name, plays randomly and plays last song after stop
Replies: 8
Views: 518

Re: Music player not refreshes playing song name, plays randomly and plays last song after stop

my_image should be global image, not screen one. Altirnatively, you can try to replace SetVariable with SetScreenVariable
by Ocelot
Mon May 14, 2018 4:20 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Music player not refreshes playing song name, plays randomly and plays last song after stop
Replies: 8
Views: 518

Re: Music player not refreshes playing song name, plays randomly and plays last song after stop

For 2 it is easy: init python: playerList = [ # Square brackets denote a list ("bgm/M01.ogg", "images/bgm/M01.png"), # Parentheses — tuple (immutable sequence of values) ("bgm/M02.ogg", "images/bgm/M02.png"), # Here you have a list of pairs basically # . . . Rest of entries ] mr = MusicRoom(fadeout=...
by Ocelot
Mon May 14, 2018 12:40 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Music player not refreshes playing song name, plays randomly and plays last song after stop
Replies: 8
Views: 518

Re: Music player not refreshes playing song name, plays randomly and plays last song after stop

1) You probably want to use action parameter of add method. It is even given example of doing something similar in documentation: "For example, These actions is used to change a screen or background, description by the playing file" https://www.renpy.org/doc/html/rooms.html#MusicRoom.add 2) playerLi...
by Ocelot
Mon May 14, 2018 12:33 pm
Forum: Ren'Py Questions and Announcements
Topic: Clarifications about condition and logic : "If not" with the use of "or" and "and"
Replies: 3
Views: 255

Re: Clarifications about condition and logic : "If not" with the use of "or" and "and"

Your condition is parsed as (not (obj_ducktape in inventory1.items)) or (obj_ducktape in inventory2.items) in has highest priority, followed by not and ending with or . You can follow Remix suggestion, or use not in operator + and : obj_ducktape not in inventory1.items and obj_ducktape not in invent...
by Ocelot
Sun May 13, 2018 3:42 pm
Forum: Ren'Py Questions and Announcements
Topic: (Solved) Hotspot "selected" state
Replies: 2
Views: 261

Re: Hotspot "selected" state

THis does not answer your actual question (because I stopped using imagemaps long ago), but there is a lot of problems with your condition: 1) renpy.music.is_playing() is True It only works accidentally (because True is a singleton). Do not use is unless you need it because == does not cut it here. ...
by Ocelot
Sat May 12, 2018 5:33 am
Forum: Ren'Py Questions and Announcements
Topic: Entire scene playing twice instead of once
Replies: 9
Views: 441

Re: Entire scene playing twice instead of once

Why it is so hard to do that? Is 'start' a screen? THen you have a huge problem: you have same name for screen and label. It is bad.

If not, you are showing label as a screen, which makes no sense. In addition, what is hard in replacing ShowMenu('start') with Start()?
by Ocelot
Sat May 12, 2018 2:59 am
Forum: Ren'Py Questions and Announcements
Topic: Text input that only allows numbers?
Replies: 5
Views: 351

Re: Text input that only allows numbers?

The standard input screen is very customiseable, as documentation tells us:
https://www.renpy.org/doc/html/input.html#text-input

In your case you want something like:

Code: Select all

$ renpy.input(allow="0123456789")
by Ocelot
Fri May 11, 2018 4:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Dialogue callbacks
Replies: 3
Views: 220

Re: Dialogue callbacks

You can extend an ADVCharacter class to do whatever you want when it is called and then defer to parent class behavior, then define all characters to be your new type.