Search found 1146 matches

by Ocelot
Mon Jul 26, 2021 9:48 am
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: type object 'LoveInterest' has no attribute 'affection'
Replies: 3
Views: 26

Re: AttributeError: type object 'LoveInterest' has no attribute 'affection'

selectedCharacter.affection tries to get value of affection of whatever is in selectedCharacter variable. When selectedCharacter is shin you have a problem: it does not have an affection field. You need to check if selectedCharacter has it before using it. Notice that your error changed. Was: File ...
by Ocelot
Sun Jul 25, 2021 1:54 pm
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: type object 'LoveInterest' has no attribute 'affection'
Replies: 3
Views: 26

Re: AttributeError: type object 'LoveInterest' has no attribute 'affection'

text "Affection: [LoveInterest.affection]"
Should be

Code: Select all

if isinstance(selectedCharacter, LoveInterest):
    text "Affection: [selectedCharacter.affection]"
by Ocelot
Sun Jul 25, 2021 11:25 am
Forum: Ren'Py Questions and Announcements
Topic: Differentiating Left/Right Dialogue Windows Using Styles?
Replies: 2
Views: 28

Re: Differentiating Left/Right Dialogue Windows Using Styles?

https://www.renpy.org/doc/html/dialogue.html#defining-character-objects Styling Text and Windows. Keyword arguments beginning with who_, what_, and window_ have their prefix stripped, and are used to style the character name, the spoken text, and the window containing both, respectively. [...] The s...
by Ocelot
Sun Jul 25, 2021 3:22 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Can we use lists and variables inside of styles?
Replies: 2
Views: 41

Re: Can we use lists and variables inside of styles?

hell_oh_world wrote:
Sun Jul 25, 2021 2:10 am
even though you make it work, your styles won't be dynamic since styles are only called once during initialization.
You can change and rebuild styles during gameplay. Though simply not messing with style definitions and changing style based on some variable is still better.
by Ocelot
Sat Jul 24, 2021 3:34 am
Forum: Ren'Py Questions and Announcements
Topic: Help me convert XT9K's code to produce a vertical gradient text effect, instead of horizontal?
Replies: 1
Views: 36

Re: Help me convert XT9K's code to produce a vertical gradient text effect, instead of horizontal?

Well, you see, it isn't actually renders characters differently. It just inserts color tag around each letter in gradient. Each letter is still drawn using single color (you can see that by applying a gradient with great hue difference to just two letters). So, a vertical gradient is only possible i...
by Ocelot
Sat Jul 24, 2021 3:23 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Exception: Possible infinite loop
Replies: 4
Views: 76

Re: Exception: Possible infinite loop

How about forcing interaction instead of using pause with a timeout? Maybe with a jump back if there are buttons which do not jump in different parts of script?
by Ocelot
Fri Jul 23, 2021 4:38 pm
Forum: Ren'Py Questions and Announcements
Topic: HELP! Exception Python interpreter not found
Replies: 2
Views: 53

Re: HELP! Exception Python interpreter not found

You probably palced RenPy or your project in the directory with non-latin symbols in its path.
by Ocelot
Fri Jul 23, 2021 12:49 pm
Forum: Ren'Py Questions and Announcements
Topic: Question about making a fan game and if it’s ok
Replies: 1
Views: 89

Re: Question about making a fan game and if it’s ok

Legally: you have to ask the IP owner (Capcom in this case). The answer is almost universally "No". In reality: as long as whatever you doing is small, self-published and non-commercial, most companies wouldn't care (unless it's Nintendo. Or Disney). Worst that happens is harshly worded Cease and De...
by Ocelot
Thu Jul 22, 2021 1:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use def: for all variables
Replies: 5
Views: 195

Re: Can I use def: for all variables

For quick reference, here is the example of using this code: init -100 python: class CharacterData: def __init__(self, character_name, money=0, money_limit=5000, love=0, power=0): self.name = character_name self. money = money self.money_limit = money_limit self.love = love self.power = power defaul...
by Ocelot
Thu Jul 22, 2021 1:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use def: for all variables
Replies: 5
Views: 195

Re: Can I use def: for all variables

You didn't show your code and how you are using it. And value self.anna_lust is suspect. It should probably be something else.
by Ocelot
Thu Jul 22, 2021 12:03 pm
Forum: Ren'Py Questions and Announcements
Topic: Can I use def: for all variables
Replies: 5
Views: 195

Re: Can I use def: for all variables

Do you want something like: init python: class CharacterData: def __init__(self, character_name, money=0, money_limit=5000, love=0, power=0): self.name = character_name self. money = money self.money_limit = money_limit self.love = love self.power = power # Other methods default david = CharacterDat...
by Ocelot
Thu Jul 22, 2021 2:42 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to change images dynamically based on mouse position
Replies: 4
Views: 670

Re: How to change images dynamically based on mouse position

Ok, I missed one thing:
Change timer 0.5 action Function(renpy.restart_interaction) to
timer 0.5 action Function(renpy.restart_interaction) repeat True
by Ocelot
Tue Jul 20, 2021 2:56 am
Forum: Ren'Py Questions and Announcements
Topic: How to make insensitive buttons have insensitive sound on click?
Replies: 2
Views: 259

Re: How to make insensitive buttons have insensitive sound on click?

Currently there is no way to do that. Insensitive means «does not receive click event», so you cannot actually click it.
You can draw invisible button over onsensitive one and use its click sound instead.
by Ocelot
Mon Jul 19, 2021 12:05 pm
Forum: Ren'Py Questions and Announcements
Topic: alternate_sound for buttons?
Replies: 2
Views: 352

Re: alternate_sound for buttons?

No, currently both left and right click reuses same sound.
https://github.com/renpy/renpy/blob/770 ... or.py#L906