Search found 113 matches

by Ace94
Fri Jul 10, 2020 6:48 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is there a way to have hovered tooltip on a text?
Replies: 7
Views: 267

Re: Is there a way to have hovered tooltip on a text?

I found the problem! I was using vbox on the textbutton which made it appear twice for some reason. Removing that fixed the problem! Thanks, guys!
by Ace94
Fri Jul 10, 2020 6:06 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is there a way to have hovered tooltip on a text?
Replies: 7
Views: 267

Re: Is there a way to have hovered tooltip on a text?

Use a textbutton in place of the text Okay, so I got this to work, but there's an issue. When I hover over the text it moves upwards and creates a duplicate underneath for some reason. Here's a pic showing what I mean: Unhovered: https://i.imgur.com/GVhLXTb.png And when I hover with the mouse: http...
by Ace94
Fri Jul 10, 2020 5:05 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is there a way to have hovered tooltip on a text?
Replies: 7
Views: 267

Re: Is there a way to have hovered tooltip on a text?

philat wrote:
Fri Jul 10, 2020 4:52 am
Hyperlinks work in text in screens.
So I can't just have the tooltip appear when hover?
by Ace94
Fri Jul 10, 2020 4:33 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is there a way to have hovered tooltip on a text?
Replies: 7
Views: 267

Re: Is there a way to have hovered tooltip on a text?

That doesn't really help me. That's for dialogue and I need it in text. I need it for something like this: screen timer_screen(): add "gui/image.png" modal True #Total played time $ minutes, seconds = divmod(int(persistent.runtime), 60) $ hours, minutes = divmod(minutes, 60) vbox: xalign 0.588 yalig...
by Ace94
Fri Jul 10, 2020 3:04 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is there a way to have hovered tooltip on a text?
Replies: 7
Views: 267

[SOLVED] Is there a way to have hovered tooltip on a text?

Hey. I know tooltip can be used on imagebutton and textbutton, but what about just text?

I tried to be smart and use empty imagebutton on the spot where the text was placed in the screen, but whenever I hover over it moves the text for some reason.
by Ace94
Thu Jul 09, 2020 9:56 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Save/load does not load the proper data
Replies: 6
Views: 325

Re: Save/load does not load the proper data

Create player after start label. label start: $player=Player() Objects (including lists&dicts) created in init block are not saved. https://www.renpy.org/doc/html/save_load_rollback.html P.S.: Or use default player=Player() Tho i personally prefer using something like label init_game: $player=Playe...
by Ace94
Thu Jul 09, 2020 8:33 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Save/load does not load the proper data
Replies: 6
Views: 325

Re: Save/load does not load the proper data

Try to use https://www.renpy.org/doc/html/save_load_rollback.html#retaining-data-after-load I tried that. It didn't fix the issue unfortunately. :( This is what happens in a nutshell: #Player saves the game here." "Walking down the path..." $ player.mc_hp = max(0, player.mc_hp-45) "You step on a sp...
by Ace94
Thu Jul 09, 2020 2:33 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Save/load does not load the proper data
Replies: 6
Views: 325

Re: Save/load does not load the proper data

init -1 python: import renpy.store as store import renpy.exports as renpy # we need this so Ren'Py properly handles rollback with classes inv_page = 0 # initial page of the inventory screen item = None class Player(renpy.store.object): def __init__(self, name, mc_max_hp=100, mc_max_mp=0, element=No...
by Ace94
Wed Jul 08, 2020 11:29 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Save/load does not load the proper data
Replies: 6
Views: 325

[SOLVED] Save/load does not load the proper data

Can anyone help please? I am doing an HP bar and at some point in the story the player takes damage like this: $ player.mc_hp = max(0, player.mc_hp-45) "You step on a spike and take 45 damage." $ player.mc_hp = max(0, player.mc_hp-30) "You trip and take 30 damage." And this works great, but if the p...
by Ace94
Sun Jul 05, 2020 11:15 am
Forum: Ren'Py Questions and Announcements
Topic: Issue when trying to drop an item
Replies: 0
Views: 225

Issue when trying to drop an item

Hi. I am stuck at an issue where I am trying to drop an item from the inventory when it gets used and reaches 0 "amount" and gets automatically deleted from the inventory at 0. This is the code I use: the class: class Backpack(renpy.store.object): def __init__(self, maxwt=100, **kwargs): self.curren...
by Ace94
Thu Jun 18, 2020 11:38 am
Forum: Ren'Py Questions and Announcements
Topic: Error with RevertableList object when trying to access Inventory
Replies: 0
Views: 285

Error with RevertableList object when trying to access Inventory

Hi. I am trying to make an inventory and everything was working correctly until I tried to make the same items stack on each other instead of taking multiple spaces in the inventory and now I am getting this Error and I can't fix it for days. If anyone has any clue I will be very glad. This is the e...
by Ace94
Wed Jun 17, 2020 7:33 am
Forum: Ren'Py Questions and Announcements
Topic: Save/Load screen (Page number can go past set amount of pages)
Replies: 11
Views: 949

Re: Save/Load screen (Page number can go past set amount of pages)

... It gave an error: I'm sorry, but errors were detected in your script. Please correct the errors listed below, and try again. File "game/inventory.rpy", line 48: invalid syntax $ renpy.say(None, "Inventory is full.{w=0.5}{nw}") ^ Ren'Py Version: Ren'Py 7.3.5.606 Wed Jun 17 14:30:14 2020 I remove...
by Ace94
Tue Jun 16, 2020 8:20 pm
Forum: Ren'Py Questions and Announcements
Topic: Save/Load screen (Page number can go past set amount of pages)
Replies: 11
Views: 949

Re: Save/Load screen (Page number can go past set amount of pages)

... Thanks! I had to change a part of your code to make it work, however. I changed $ max_inv_page = int(len(inventory.items)/9) to $ max_inv_page = 5 For it to display a maximum number of 5 pages. However, I have another issue now. When the player gets more than the 5 pages the game continues to a...
by Ace94
Tue Jun 16, 2020 12:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Save/Load screen (Page number can go past set amount of pages)
Replies: 11
Views: 949

Re: Save/Load screen (Page number can go past set amount of pages)

FilePageNext(max=None, wrap=False) I don't know if this thread is the right place, but I tried using the code above for setting up maximum inventory pages, but it sadly didn't work. Does anyone know what I have to do to make it work to set limited amount of pages in an inventory system? screen inve...
by Ace94
Tue Jun 16, 2020 12:56 am
Forum: Ren'Py Cookbook
Topic: Inventory Screen
Replies: 94
Views: 54243

Re: Inventory Screen

Hi! How can you buy or add more than one item (in bulk)? Does anyone know? $inventory.buy(gun) "Me" "Nice" $inventory.add(laser) Also, how to make a max inventory space and make a message notifying the player that his bag is full? And selling items to a vendor would be possible with this code? Thank...