Search found 446 matches

by Anima
Thu Aug 29, 2013 12:46 pm
Forum: Ren'Py Questions and Announcements
Topic: why ren'py? WHY ?!!
Replies: 8
Views: 1276

Re: why ren'py? WHY ?!!

b isn't global inside the function. Setting it to global outside has no effect on the b inside the function scope.
by Anima
Thu Aug 29, 2013 10:40 am
Forum: Ren'Py Questions and Announcements
Topic: Questions about classes and attributes [SOLVED]
Replies: 4
Views: 1149

Re: Problem runing this in renpy:

You probably tried to access the class directly. Only the instances of the class have these attributes. Create an instance of lw to make it work.
by Anima
Wed Aug 28, 2013 6:53 pm
Forum: Ren'Py Questions and Announcements
Topic: How to show the correct image in a screen?[Solved]
Replies: 6
Views: 1042

Re: How to show the correct image in a screen?

The code in the first post checks for the variable zinraf_race, the variable in the viewer is called zinref_race. Did you change the name or is this the problem?
by Anima
Mon Aug 26, 2013 8:51 pm
Forum: Ren'Py Questions and Announcements
Topic: How to show the correct image in a screen?[Solved]
Replies: 6
Views: 1042

Re: How to show the correct image in a screen?

jw2pfd last code example is the/a correct way to do this.
Screenshots would help, as well as the dimensions of the pictures and screen.
Another problem might be that no variable is set to true, then nothing would be displayed of course.
by Anima
Mon Aug 26, 2013 7:00 pm
Forum: General Discussion
Topic: Forum oddities...
Replies: 11
Views: 1282

Re: Forum oddities...

#6 The thread counts as displayed include its 2 subforum, so I have to subtract to get a count on the main WIP forum alone. I assumed that anything that stay in the Ideas thread would never made it to Completed Games, and NaNoRenO is just a small event and also probably have much lower completion r...
by Anima
Sat Aug 24, 2013 3:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Else...
Replies: 5
Views: 766

Re: Else...

In that case I would recommend the following. $ shopping_list = [] # This is best placed under the start label label shopping: menu: "Buy apple.": $ shopping_list.append("apple") e "You bought an apple." "Buy orange.": $ shopping_list.append("orange"...
by Anima
Sat Aug 24, 2013 4:52 am
Forum: Ren'Py Questions and Announcements
Topic: Else...
Replies: 5
Views: 766

Re: Else...

label next: if apple: e "You eat the apple." elif orange: e "You eat the orange." elif pie: e "You eat the pie." else: "You decided to buy nothing." return You didn't connect the if statements. The else case of the the pie if would always run if pie was False...
by Anima
Thu Aug 22, 2013 9:52 pm
Forum: Ren'Py Questions and Announcements
Topic: Invalid Syntax SyntaxError: What did I do wrong now?
Replies: 5
Views: 1128

Re: Invalid Syntax SyntaxError: What did I do wrong now?

You can do the same thing with this structure: if exp > 15999: $ level = 15 elif exp > 9199: $ level = 14 elif exp > 7799: $ level = 13 ... As you see you only need one test instead of two. It's also faster since it stops when the right level is reached. The elif clauses are only elevated if the pre...
by Anima
Thu Aug 22, 2013 5:58 pm
Forum: Ren'Py Questions and Announcements
Topic: Invalid Syntax SyntaxError: What did I do wrong now?
Replies: 5
Views: 1128

Re: Invalid Syntax SyntaxError: What did I do wrong now?

You can also slim the code down by using elif statements. Or even more with a loop and a formula.

Code: Select all

$ next_level = 1
$ next_level_xp = 100
while exp >= next_level_xp:
    $ next_level += 1
    $ next_level_xp += next_level*100
$ level = next_level
by Anima
Tue Jul 30, 2013 11:25 am
Forum: Ren'Py Questions and Announcements
Topic: is it possible to have an array of characters?
Replies: 9
Views: 1298

Re: is it possible to have an array of characters?

Didn't even read the name, that's really unacceptable and should be changed or the user banned.
by Anima
Tue Jul 30, 2013 3:57 am
Forum: Ren'Py Questions and Announcements
Topic: is it possible to have an array of characters?
Replies: 9
Views: 1298

Re: is it possible to have an array of characters?

Yes it's

Code: Select all

my_character_list.append(my_new_character)
Needs to be done in a python inline or environment.
by Anima
Mon Jul 08, 2013 2:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Persistent Data not saving after game closes[solved]
Replies: 6
Views: 1248

Re: Persistent Data not saving after game closes

Actually you don't need to initialize persistent variables at all. If the variable is not defined the persistent object always returns a False value.
by Anima
Tue Jul 02, 2013 11:00 pm
Forum: Ren'Py Questions and Announcements
Topic: Problem using a dictionary [SOLVED]
Replies: 3
Views: 1769

Re: Problem using a dictionary

This is how you can do it. If the romanji is not in the list it will return None.

Code: Select all

init python:
    def convert_romaji_to_kana(romaji, kana_list):
        return kana_list.get(romanji)
by Anima
Fri Jun 28, 2013 10:01 pm
Forum: Creator Discussion
Topic: Awesome book: The Art of Game Design by Jesse Schell
Replies: 4
Views: 936

Re: Awesome book: The Art of Game Design by Jesse Schell

The book is really good and is also very much suitable for VN design. Actually most of it applies directly to VN design.
Though a lot of it is pretty abstract, it's not a paint by the number guide. Still it's a very good starting point for your own thoughts on game design.
by Anima
Fri Jun 28, 2013 1:08 pm
Forum: Ren'Py Cookbook
Topic: Dungeon Crawl RPG Framework
Replies: 99
Views: 60751

Re: Dungeon crawling RPG frame

The problem is that keyword arguments (everything in the form eggs=spam) must come after arguments that are assigned by position.

Code: Select all

$ player = Actor("Yamato Unit", max_hp=100, skills=[Shoot, Grenade, Heal])
should work.