Search found 7 matches

by Oduvan
Wed Oct 02, 2019 12:33 pm
Forum: Ren'Py Questions and Announcements
Topic: Problem with displaying images in imagebutton
Replies: 3
Views: 533

Re: Problem with displaying images in imagebutton

Thanks for reply, but this not what i want to achieve. I need items in inventory dictionary to automatically appear as buttons after i add them to inventory. Then after click on them they become "selected_item" and can be equipped. It was working with objects of class but there was a problem when i ...
by Oduvan
Wed Oct 02, 2019 11:00 am
Forum: Ren'Py Questions and Announcements
Topic: Problem with displaying images in imagebutton
Replies: 3
Views: 533

Problem with displaying images in imagebutton

Hello. Im new to coding and struggling at remake Elaine's inventory system with dictionaries (is it even possible?) Have a dictionary with all items. For example: default itemz = {'sword': {"name": "sword",'img': img_path + "steel_sword_idle.png", "atk":10,"val":20},'helm': {"name": "helm",'img': im...
by Oduvan
Mon Sep 30, 2019 2:32 pm
Forum: Ren'Py Questions and Announcements
Topic: On Asking Questions
Replies: 110
Views: 79525

Re: On Asking Questions

Hi. Simple question - how do i add nested dictionaries values to a variable? For example: default test_var = 1 default itemz = {"sword": {"name": "sword","atk":10,"val":20},'helm': {"name": "helm","atk": 0,"def": 10,"val": 20}} label start: "[itemz!q]" "add some points..." $test_var += [itemz[sword]...
by Oduvan
Fri Sep 27, 2019 1:44 pm
Forum: Ren'Py Cookbook
Topic: Inventory Screen
Replies: 89
Views: 46079

Re: Inventory Screen

Is there a possibility to add multiple same objects to this inventory and select only one of them?
Image
by Oduvan
Wed Sep 25, 2019 10:38 am
Forum: Ren'Py Questions and Announcements
Topic: Problem with RPG Inventory by Elaine
Replies: 14
Views: 820

Re: Problem with RPG Inventory by Elaine

Look, after click on an item in inventory we set variable "selected_item" to this item. grid 5 5: for item in inventory: frame: style "slot" imagebutton idle item.img hover item.img_hover action SetVariable("selected_item", item) xalign 0.5 yalign 0.5 for i in range(len(inventory),25): frame: style ...
by Oduvan
Sun Sep 22, 2019 4:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Problem with RPG Inventory by Elaine
Replies: 14
Views: 820

Re: Problem with RPG Inventory by Elaine

Customizing this inventory and i need help with outlining selected item like this Image

Nwm, already solved it, you can delete this post.
by Oduvan
Sun Jul 23, 2017 2:36 am
Forum: Ren'Py Questions and Announcements
Topic: Question about variables.
Replies: 1
Views: 204

Question about variables.

I have noobish question about variables:
init:
$ a = 1
$ b = 1
$ c = a+b
At first renpy tells "c=2" and it's alright, but after i add a point to "a" or "b" and ask renpy to show "c" it tells that "c" still =2. Why? How can i tell renpy update "c" every time "a" or "b" changed?