Search found 113 matches

by Adrian_DVL
Sun Apr 05, 2020 6:17 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] A way to advance through the scenes playing a minigame?
Replies: 4
Views: 279

Re: A way to advance through the scenes playing a minigame?

easy, put something like this inside your minigame modal True timer .5 repeat True action If(points > 100, Return()) a return inside a modal screen does the same thing as if the player have clicked Wow! I didn't know that! Sounds promising, the problem is that it gave me a traceback saying that a t...
by Adrian_DVL
Sun Apr 05, 2020 5:33 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] A way to advance through the scenes playing a minigame?
Replies: 4
Views: 279

[Solved] A way to advance through the scenes playing a minigame?

Hi mates! Here's the thing: I have a minigame built on a modal screen, so while the minigame is working, the player can't go to the next images in the background. Now, the minigame has several phases, so the player has to win a certain amount of "points" in order to win. So I want the game to go thr...
by Adrian_DVL
Fri Mar 27, 2020 5:37 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltip showing the values of all objects in a for loop
Replies: 6
Views: 320

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

... You check if tooltip: for each button, but no matter what button you hovering they all set the same variable 'tooltip', so condition became true for all buttons. In code sample tooltip was showing once and not for each textbutton. Try the solution gas gave - https://lemmasoft.renai.us/forums/vi...
by Adrian_DVL
Fri Mar 27, 2020 4:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltip showing the values of all objects in a for loop
Replies: 6
Views: 320

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

Did you placed imagebuttons inside a vbox? Nope. How big are images used for imagebuttons - any chance they are overlap each other? They're 80x80. They don't overlap each other at all. In fact, my problem is exactly the opposite: I can see them all, each one 100 pixels to the left and up from the o...
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: 320

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: 320

[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: 368

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: 368

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: 368

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: 368

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: 368

[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: 298

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: 298

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: 298

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: 215

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...