Search found 94 matches

by Adrian_DVL
Fri Mar 27, 2020 3:27 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltip showing the values of all objects in a for loop
Replies: 6
Views: 190

Re: Tooltip showing the values of all objects in a for loop

Alex wrote:
Fri Mar 27, 2020 3:14 pm
Try it like https://www.renpy.org/doc/html/screen_a ... l#tooltips
I must admit it really is much more simple, so thank you! Unfortunately, it does the same with a difference: now if I hover an object, the tooltip image for THAT object is displayed next to EVERY object over and over again.
by Adrian_DVL
Fri Mar 27, 2020 3:09 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltip showing the values of all objects in a for loop
Replies: 6
Views: 190

[Solved] Tooltip showing the values of all objects in a for loop

Hi! I have a screen that has a for loop which shows a list of the objects of a class. Simplifying it, it's something like this: screen screen(): default st = Tooltip("sys/no.png") ... for item in sorted_store: ... $ spic = obj.pic $ shpic = obj.hpic $ stt = obj.tt # <-- This is the image that I want...
by Adrian_DVL
Fri Mar 27, 2020 2:57 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Preventing one specific object of a list from showing
Replies: 8
Views: 204

Re: [Solved] Preventing one specific object of a list from showing

Kia wrote:
Fri Mar 27, 2020 2:44 pm
just to be clear "pass" is usually used with "else"

Code: Select all

        if obj == ignored_obj:
            pass
	else:
		do something
I should've spent few more second to write that part in my first answer. sorry
That's okay, I've tried it correctly anyway. Thank you too!
by Adrian_DVL
Fri Mar 27, 2020 11:43 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Preventing one specific object of a list from showing
Replies: 8
Views: 204

Re: Preventing one specific object of a list from showing

Remix wrote:
Fri Mar 27, 2020 11:28 am
Ah, I had thought 'continue' was ok in screens

Just use a condition around your normal code then ... if obj != ignored_obj: # show the content (else do nothing)
That did work! Inverting the condition and conditioning all the for loop to that, as you suggested, work perfectly fine. Thank you!
by Adrian_DVL
Fri Mar 27, 2020 11:39 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Preventing one specific object of a list from showing
Replies: 8
Views: 204

Re: Preventing one specific object of a list from showing

Kia wrote:
Fri Mar 27, 2020 11:25 am
pass should do the job

Code: Select all

        if obj == ignored_obj:
            pass
Already tried that before reading this. I tried passing ignored_obj as a parameter for the screen and defining it inside the screen. This time I got no error parsing the code, but it didn't work.
by Adrian_DVL
Fri Mar 27, 2020 11:01 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Preventing one specific object of a list from showing
Replies: 8
Views: 204

Re: Preventing one specific object of a list from showing

screen screen_name(ignored_obj): for obj in class.objects: if obj == ignored_obj: continue ... add "[obj.name].png" I had already tried that: I'm sorry, but errors were detected in your script. Please correct the errors listed below, and try again. File "game/game_screens.rpy", line 1068: u'continu...
by Adrian_DVL
Fri Mar 27, 2020 10:44 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Preventing one specific object of a list from showing
Replies: 8
Views: 204

[Solved] Preventing one specific object of a list from showing

Hi mates! I have a class with some objects, and I have a screen that shows a list of those objects, that simplifying it, could be like this: screen screen(obj): for obj in class.objects: ... image "[obj.name].png" As you may have noticed, that screen has "obj" passed as a parameter. That's because i...
by Adrian_DVL
Thu Mar 26, 2020 3:01 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicImages in an imagebutton don't work
Replies: 4
Views: 187

Re: DynamicImages in an imagebutton don't work

Update on this: since it seems I can't put a dynamic image neither in an imagebutton nor inside an imagemap, what I've done is "add" the dynamic image before the imagebutton, and for the imagebutton I just put a fader, just like this: if unlock_vid: add "girls/[girl.name]_videos.png" pos (122, 76) i...
by Adrian_DVL
Thu Mar 26, 2020 1:37 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicImages in an imagebutton don't work
Replies: 4
Views: 187

Re: DynamicImages in an imagebutton don't work

Dunno, but try retrieve the name before using it in the imagebutton. if unlock_vid: add "girls/[girl.name]_videos.png" pos (122, 76) if girl.vid1: $ dagal = girl.name imagebutton: idle "girls/[dagal]_vid1.png" hover "girls/[dagal]_hvid1.png" I think the error is there as an impossibility to dynamic...
by Adrian_DVL
Thu Mar 26, 2020 12:44 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicImages in an imagebutton don't work
Replies: 4
Views: 187

DynamicImages in an imagebutton don't work

Hi, mates! Here's the thing: I have this action on an imagebutton: action Show('videos', girl=girl) Which leads to a screen that shows an image depending on the girl (object) of a list (class) that is passed as the parameter. This works fine, and the button leads to the screen, which is this one: sc...
by Adrian_DVL
Wed Mar 25, 2020 4:25 pm
Forum: Ren'Py Questions and Announcements
Topic: Show elements on a screen depending on the "active" object of a class
Replies: 2
Views: 163

Re: Show elements on a screen depending on the "active" object of a class

Make a list of such objects, then a cycle like this: for i in object_list: if i.active: add i.pic Another idea is to sort out the thing with a list comprehension (i dunno if that's faster, but work the same). $ obj = [x for x in object_list if x.active] add obj.pic Anyway, using a parameter to chec...
by Adrian_DVL
Wed Mar 25, 2020 3:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Show elements on a screen depending on the "active" object of a class
Replies: 2
Views: 163

Show elements on a screen depending on the "active" object of a class

Hi mates! So, I have a bunch of complex classes and functions, but let me simplify it so that we can go directly to the point. Let's say I only have a class to work on, just like this: class Test(renpy.store.object): def __init__(self, name, pic): self.name = name self.pic = pic Where "pic" is the i...
by Adrian_DVL
Tue Mar 24, 2020 4:10 pm
Forum: Ren'Py Questions and Announcements
Topic: Notify and custom transforms interfere themselves?
Replies: 0
Views: 163

Notify and custom transforms interfere themselves?

So I have a weird problem regarding graphics. I have different transforms for the Notify screens depending on what I want to notify, like this: transform notify_appear: xalign .5 ypos 66 on show: alpha 0 linear .25 alpha 1.0 on hide: linear .5 ypos 56 alpha 0.0 transform notify_money: xpos 1284 ypos...
by Adrian_DVL
Tue Mar 24, 2020 6:39 am
Forum: Ren'Py Questions and Announcements
Topic: Different textboxes depending on character
Replies: 2
Views: 226

Re: Different textboxes depending on character

---- how can I define two different styles for the dialogue window and use them, if that method is more efficient than mine? If you go into the screens.rpy and look for the 'screen say(who, what)', you will find a block in that screen called 'style window' . You can copy paste that block. Do whatev...
by Adrian_DVL
Mon Mar 23, 2020 10:20 am
Forum: Ren'Py Questions and Announcements
Topic: Different textboxes depending on character
Replies: 2
Views: 226

Different textboxes depending on character

Hi! Here's the thing: there are two different "scenarios" in my game. In one of them, I want the characters to speak normally, like in every VN, with the textbox on the bottom of the screen and the text filling all the width. In the other one, I want the text to fill just part of the right side of t...