Search found 446 matches
- Sun Nov 24, 2013 12:49 am
- Forum: Ren'Py Questions and Announcements
- Topic: If n is True: it works. Else: breaks the game
- Replies: 4
- Views: 684
Re: If n is True: it works. Else: breaks the game
All variables belong to their enclosing context, it's just that a label is not a context. It's better to set the variables in labels since they will all belong to Ren'Pys store which is what we want in most cases. Some things go outside of labels because they have an implied init block. They work th...
- Sun Nov 24, 2013 12:44 am
- Forum: Ren'Py Questions and Announcements
- Topic: Will this work as a combat engine?
- Replies: 2
- Views: 686
Re: Will this work as a combat engine?
You need to ask a more specific question before most people will work trough your code. That said you should move the def statements into an init python: block. There is really no reason to define the functions in a label. If you want to expand the engine further you really should work with classes ...
- Sun Nov 24, 2013 12:39 am
- Forum: Ren'Py Questions and Announcements
- Topic: If n is True: it works. Else: breaks the game
- Replies: 4
- Views: 684
Re: If n is True: it works. Else: breaks the game
That should be inside the start label.First know this is at the top before "label start"
- Fri Nov 22, 2013 12:11 pm
- Forum: Ren'Py Cookbook
- Topic: Dungeon Crawl RPG Framework
- Replies: 99
- Views: 62090
Re: Dungeon crawling RPG frame
Yes you need the show screen command.
- Fri Nov 22, 2013 10:09 am
- Forum: Ren'Py Cookbook
- Topic: Dungeon Crawl RPG Framework
- Replies: 99
- Views: 62090
Re: Dungeon crawling RPG frame
All the class definitions need to be in a python block.
Code: Select all
python:
class ...
- Wed Nov 13, 2013 7:29 am
- Forum: Ren'Py Questions and Announcements
- Topic: remove /drag & drop / combining items
- Replies: 26
- Views: 4655
Re: items.remove / drag & drop / combining items
Please post the part where you fill the inventory, including the item definitions.
- Tue Nov 12, 2013 8:08 pm
- Forum: Ren'Py Questions and Announcements
- Topic: remove /drag & drop / combining items
- Replies: 26
- Views: 4655
Re: items.remove / drag & drop / combining items
Alright so I changed it and now I've got this thing showing up: IndexError: list index out of range and this is what is going wrong: idle inventory.items[i][0] which is from this code: for i in range(len(inventory.items)): imagebutton: action inventory.items.remove(inventory.items[i]) idle inventor...
- Tue Nov 12, 2013 6:28 pm
- Forum: Ren'Py Questions and Announcements
- Topic: remove /drag & drop / combining items
- Replies: 26
- Views: 4655
Re: items.remove / drag & drop / combining items
Sorry, the list was only a placeholder for general lists to show the principle. The list you have there is inventory.items, so just use inventory.items.remove(inventory.items).
- Tue Nov 12, 2013 6:06 pm
- Forum: Ren'Py Questions and Announcements
- Topic: remove /drag & drop / combining items
- Replies: 26
- Views: 4655
Re: items.remove / drag & drop / combining items
list.remove expects the actual item, not the index. If you want to remove an item by index do it like this:
Code: Select all
list.remove(list[i])
- Tue Oct 22, 2013 2:15 pm
- Forum: Ren'Py Cookbook
- Topic: Dungeon Crawl RPG Framework
- Replies: 99
- Views: 62090
Re: Dungeon crawling RPG frame
Yes it would. (I should add the changing the character portrait is an elegant way to show status changes, but it doesn't work very well if the character can have more than one status. Combinatorial explosion rears it's ugly head there.) And please don't double post if you want to add something, you ...
- Mon Oct 21, 2013 5:08 pm
- Forum: Ren'Py Cookbook
- Topic: Dungeon Crawl RPG Framework
- Replies: 99
- Views: 62090
Re: Dungeon crawling RPG frame
The basic idea I usually use is to have every effect as an object. Simply store all effects in a list on the character and iterate trough it at the beginning of her turn. During the iteration you make two calls. One to the effect objects do method and another to it's expired method. The do method do...
- Mon Oct 21, 2013 10:41 am
- Forum: Ren'Py Questions and Announcements
- Topic: KeyError on setting screen variables
- Replies: 3
- Views: 595
Re: KeyError on setting screen variables
You need to do it this way instead:
The [] substitution doesn't work with screen language, Ren'Py thinks you're trying to access a dictionary.
Code: Select all
label ("%i" %hp)
- Fri Sep 27, 2013 11:23 pm
- Forum: Ren'Py Questions and Announcements
- Topic: if/elif Statement Errors
- Replies: 6
- Views: 980
Re: if/elif Statement Errors
Indent the return statements, they stop the if block at the moment.
- Sun Sep 01, 2013 6:21 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Renpy in Browser?
- Replies: 7
- Views: 2132
Re: Renpy in Browser?
Hmm, that is quite a good idea actually. Since my internet only has 10 GB which means if I download things to a limit where it gets to 10 GB, I have to pay for my internet again. So right now, I can't even download any Ren'Py games or anything, which is very unfortunate for me... And I'm sure, like...
- Thu Aug 29, 2013 1:04 pm
- Forum: Ren'Py Questions and Announcements
- Topic: why ren'py? WHY ?!!
- Replies: 8
- Views: 1286
Re: why ren'py? WHY ?!!
No, the global designation just means that the b inside the function is the same as the global b. It's probably better to give it as a parameter.