Search found 58 matches
- Wed May 15, 2019 7:34 am
- Forum: I am a Programmer, Director, or Other
- Topic: Experienced Visual Novel & Web Programmer [Basic Rates Stated]
- Replies: 4
- Views: 2559
Re: Experienced Visual Novel & Web Programmer [Basic Rates Stated]
Open for work again!
- Wed May 30, 2018 7:59 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
- Wed May 30, 2018 11:42 am
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
The first way basically gets triggered when the inventory screen is updated (by being called or some external influence) because once you do a string operation to the text, the text is treated as static and unchanging. I could be wrong about how text interpolation works ("[variable_name]"...
- Wed May 30, 2018 10:33 am
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
Phew, I've managed to get this code working! init -1 python: import renpy.store as store import renpy.exports as renpy from operator import attrgetter inv_page = 0 item = None class Player(renpy.store.object): def __init__(self, name, max_hp=0, max_mp=0, element=None): self.name=name self.max_hp=max...
- Tue May 29, 2018 7:44 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
If you're setting use_item = key, need to compare use_item == key. Changed that, and it's working now! Thanks! TypeError: 'unicode' object is not callable Not 100% sure but it may be because you've got a function AND a variable both called use_item. Try changing your function or variable name to so...
- Tue May 29, 2018 2:06 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
Okays, so I've read through both your advices and this is what I have came to put together hahahah: init 1: default item = 0 default use_item = 0 default inventory = { 'Blue Gem': {"idle":"images/inventory/gem_blue.png", "selected":"images/inventory/gem_blue_select...
- Tue May 29, 2018 10:34 am
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
The problem usually arises when you try to add children to a grid that doesn't have enough rows or column. Change this line of code: for i in range(8 - len(inventory)): null To this: for key in inventory: for i in range(8 - len(inventory[key])): null - Your original code with the new inventory dict...
- Mon May 28, 2018 8:54 pm
- Forum: Ren'Py Cookbook
- Topic: Inventory Screen
- Replies: 100
- Views: 102278
Re: Inventory Screen
You probably forgot to create the inventory object: inventory = Inventory() You need to create an inventory object after "label start:" and before using it. Check out the code in script.rpy just after label start. Hey first of all, thanks for providing the inventory code! I've tried using...
- Mon May 28, 2018 7:27 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
I'm checking your inventory dictionary but I don't see any "normal" or "select" ? Also, when you access a value from a key inside a dictionary you use the indice which should be declared something as such: dictionary_name [key] [indice number] if you have multiple values. ... id...
- Mon May 28, 2018 7:18 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
I'd loop through it like this: for item in inventory: imagebutton: xsize 73 ysize 71 idle item["idle"] selected_idle item["select"] selected_hover item["select"] hovered Show("description", item = item) unhovered Hide("description") action SetVariab...
- Mon May 28, 2018 10:43 am
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Re: Inventory System with click-to-use-item feature
2 - don't use a list of lists to store your items - you don't have a contextual reference to any of the items this way. If you don't want to use objects, then at least use a python dictionary to store them - that way you'll be reference their properties by item["name"], item["image&q...
- Mon May 28, 2018 9:21 am
- Forum: Ren'Py Questions and Announcements
- Topic: Inventory System with click-to-use-item feature
- Replies: 23
- Views: 3693
Inventory System with click-to-use-item feature
Heyyy so I'm trying to make an inventory system but I got stuck pretty badly at implementing this function. I want to make it such that users can select an object from the inventory screen then decide what they would want to do with it, like drop it, or use it. If not they can simply select another ...
- Tue Mar 20, 2018 7:26 am
- Forum: Ren'Py Questions and Announcements
- Topic: Cursor change when dialogue ends?
- Replies: 3
- Views: 530
Re: Cursor change when dialogue ends?
init python: config.mouse = { # default cursor 'default' : [("gui/mouse_default.png", 0, 0)], # default say cursor 'say' : [("gui/mouse_click.png", 0, 0)], # cursor based on character.mode 'dee' : [("gui/mouse_click_dee_only.png", 0, 0)] } define dee = Character("...
- Mon Mar 19, 2018 1:49 am
- Forum: Ren'Py Questions and Announcements
- Topic: Cursor change when dialogue ends?
- Replies: 3
- Views: 530
Cursor change when dialogue ends?
Hi, I'm looking to have my game cursor change into an arrow when the dialogue finishes, so as to prompt the user to click for the next line, same concept as ctc, but instead of it displaying in the textbox, I want it to display as my mouse instead. I've put together some codes I found from around th...
- Mon Feb 05, 2018 1:30 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Gallery with Pages Linkage
- Replies: 2
- Views: 833
Gallery with Pages Linkage
I tried making a cg gallery by combining the cg gallery code and the save/load code. But I can't seem to get the pages to link together. Right now, the title of the page will follow the correct page number selected, but the grids displaying the cgs wouldn't change pages . Also, if I leave the "...