Search found 1883 matches

by Ocelot
Mon Nov 07, 2016 5:37 pm
Forum: Ren'Py Questions and Announcements
Topic: "<x> will remember that" notifications on the corner?
Replies: 4
Views: 1040

Re: "<x> will remember that" notifications on the corner?

1) renpy.notify is a Python statement so it shuld be prepended with dollar sign
2) It expects string as argument, not raw words

So it should look like:

Code: Select all

$ renpy.notify('Thereaedi did not appreciate that.')
by Ocelot
Mon Nov 07, 2016 11:26 am
Forum: Ren'Py Questions and Announcements
Topic: "<x> will remember that" notifications on the corner?
Replies: 4
Views: 1040

Re: "<x> will remember that" notifications on the corner?

Check renpy.notify() function and Notify screen action. You will probably want to change notify screen to tweak it appearance.
by Ocelot
Sun Nov 06, 2016 11:26 am
Forum: Ren'Py Questions and Announcements
Topic: Bug in else Statement
Replies: 5
Views: 507

Re: Bug in else Statement

This is really strange, because trace clearly shows that variable badjoke1 is not defined.

Are you sure that you have saved file after you added default values?
Did you try to force recompilation of files from launcher?
Does this happen on clear run of the game (no reloads, no loading of save game)?
by Ocelot
Sun Nov 06, 2016 11:22 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to call a label with number of points?
Replies: 6
Views: 844

Re: How to call a label with number of points?

If you just want to call a label with different parameters, there is no need for call expression trickery: label insinuation(points = 0): if points == 0: 'you have no points' elif points == 1: 'you have one point' else: 'you have many points' # ... call insinuation(insinuation_points)
by Ocelot
Sun Nov 06, 2016 8:47 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to call a label with number of points?
Replies: 6
Views: 844

Re: How to call a label with number of points?

So, RenPy substitution does not work here. Use second version then.

Code: Select all

call expression 'insinuation_%d' % insinuation_points
# or
call expression 'insinuation_%s' % str(insinuation_points)
(Actually, any Python substitution method should work here)
by Ocelot
Sun Nov 06, 2016 2:50 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to call a label with number of points?
Replies: 6
Views: 844

Re: How to call a label with number of points?

You can use call expression: https://www.renpy.org/doc/html/label.ht ... -statement

Code: Select all

call expression 'insinuation_[insinuation_points]'
# Or
call expression 'insinuation_%s' % insinuation_points
by Ocelot
Sun Nov 06, 2016 2:45 am
Forum: Ren'Py Questions and Announcements
Topic: Bug in else Statement
Replies: 5
Views: 507

Re: Bug in else Statement

The code says that there is no variable badjoke1. My psychic powers says that you never set that variable to anything in execution path which leads to crash. Example: menu: 'tell a bad joke': $ badjoke = True 'nothing': pass if badjoke: pass This code will crash if you choose 'nothing': if statement...
by Ocelot
Sat Nov 05, 2016 10:25 am
Forum: Ren'Py Questions and Announcements
Topic: Add a character voice sound effect
Replies: 4
Views: 1210

Re: Add a character voice sound effect

But that doesn't make a sound repeat until the phrase is over The trick is to record a sound consisting of repeated blips. This sound should be longer that longest phrase you can expect. I don't believe there is something like callbacks for each letter. For my typewriter effect I just made unique s...
by Ocelot
Thu Nov 03, 2016 5:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu and button help for a beginner? (Party/mission select)
Replies: 7
Views: 995

Re: Menu and button help for a beginner? (Party/mission sele

Screen language is a kind of markup language in RenPy. Like HTML, it describes how things are looking, what will happen if you hover on things, click them, etc.. Calling a screen is like calling a function, it means to show the screen and stop executing code until screen will return something (via R...
by Ocelot
Wed Nov 02, 2016 11:04 am
Forum: Ren'Py Questions and Announcements
Topic: Is it posible to redefine image after game start?
Replies: 49
Views: 3848

Re: Is it posible to redefine image after game start?

It seems that the best way to do what you want would be to modify RenPy parser, so it would prepend all image names and image names in show statements within user-provided addon files with some unique identifier. So image myimage = '123.jpg' # ... show myimage would become image 067cc265_myimage = '...
by Ocelot
Wed Nov 02, 2016 8:00 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED!] Discussion menu?
Replies: 4
Views: 467

Re: Discussion menu?

Yes, something like: python: seen_A = False seen_B = False seen_C = False menu disscussionloop: 'A': # ... $ seen_A = True jump discussionloop 'B': # ... $ seen_B = True jump discussionloop 'C': # ... $ seen_C = True jump discussionloop 'D' if seen_A and seen_B and seen_C: # ... jump discussionend
by Ocelot
Wed Nov 02, 2016 7:51 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED!] Discussion menu?
Replies: 4
Views: 467

Re: Discussion menu?

You need to define variable you refer to: $ unlocked_D = False menu disscussionloop: 'A': # ... $ unlocked_D = True jump discussionloop 'B': # ... $ unlocked_D = True jump discussionloop 'C': # ... $ unlocked_D = True jump discussionloop 'D' if unlocked_D: # ... jump discussionend
by Ocelot
Wed Nov 02, 2016 7:37 am
Forum: Ren'Py Questions and Announcements
Topic: Is it posible to redefine image after game start?
Replies: 49
Views: 3848

Re: Is it posible to redefine image after game start?

Code: Select all

image some_pic:
        '[myvariable]'
I believe, it should be:

Code: Select all

image some_pic = DynamicImage('[myvariable]')
by Ocelot
Wed Nov 02, 2016 7:35 am
Forum: Ren'Py Questions and Announcements
Topic: Is it posible to redefine image after game start?
Replies: 49
Views: 3848

Re: Is it posible to redefine image after game start?

Its a worst solutuion It is actually an industry standard in programming for avoiding name clashes. In C++ you have namespaces, in Java you have packages, in Python you have modules, in C you have "just prepend your chosen prefix manually". To solve verbosity problems many languages have namespace ...
by Ocelot
Tue Nov 01, 2016 6:34 pm
Forum: Ren'Py Questions and Announcements
Topic: Is it posible to redefine image after game start?
Replies: 49
Views: 3848

Re: Is it posible to redefine image after game start?

I cant use it as i cant change code for defining of 1st pic. ... i need to redefine image after game start. Or define it after game start. Why is it so? What is the use case of that? There is no problem which could not be solved with image defined in init time, if you are willing to use displayable...