Search found 1760 matches

by philat
Wed Sep 30, 2020 9:16 pm
Forum: Ren'Py Questions and Announcements
Topic: What is the best way to do a smooth zoom towards a part of a sprite?
Replies: 6
Views: 74

Re: What is the best way to do a smooth zoom towards a part of a sprite?

Align is equal to setting the anchor and pos -- you're likely getting this effect because the anchor is moving. If you want to end up at yalign 1.0, I would suggest using yanchor 1.0 and going from a ypos greater than 1 to ypos 1.0. You also don't need parallel, linear 1.0 zoom 2.0 ypos 0.0 will int...
by philat
Mon Sep 21, 2020 10:20 am
Forum: Ren'Py Questions and Announcements
Topic: SOLVED init python: Error (parsing script failed)
Replies: 11
Views: 160

Re: init python: Error (parsing script failed)

NVM misread; carry on. In any case it would be faster to share the whole file or project or try retracing your steps in a clean project to find the error.
by philat
Thu Aug 27, 2020 7:04 am
Forum: Ren'Py Questions and Announcements
Topic: Help on simplifying conditional dialogue choice branches?
Replies: 4
Views: 233

Re: Help on simplifying conditional dialogue choice branches?

HEXdidnt is correct, but looking at your logic, I would say pulling the logic out into python entirely and generating the menu programmatically would also be beneficial. # logic goes here - do whatever needs to be done, return the list of possible options $ returned_list = ["Chizza", "Macy", "Edna"]...
by philat
Sat Aug 22, 2020 1:28 pm
Forum: Ren'Py Questions and Announcements
Topic: Is it possible to highlight some text when hovering over button?
Replies: 6
Views: 411

Re: Is it possible to highlight some text when hovering over button?

Well yes. There are any number of ways to do so, but I suppose one of the the easier ones is to use menu arguments. https://www.renpy.org/doc/html/menus.ht ... -arguments
by philat
Sat Aug 22, 2020 4:38 am
Forum: Ren'Py Questions and Announcements
Topic: Is it possible to highlight some text when hovering over button?
Replies: 6
Views: 411

Re: Is it possible to highlight some text when hovering over button?

I don't know what kind of hover effect you want, but in principle, you would use a boolean variable to control whether the text is "hovered" or not. Then use the button hovered/unhovered actions to control the boolean variable.
by philat
Sat Aug 22, 2020 4:24 am
Forum: Ren'Py Questions and Announcements
Topic: Get audio channel volume
Replies: 1
Views: 265

Re: Get audio channel volume

_preferences.get_volume("mixername") returns volume as a float between 0 and 1.
by philat
Tue Aug 18, 2020 11:35 am
Forum: Ren'Py Questions and Announcements
Topic: Trouble with simple card flip animation
Replies: 5
Views: 249

Re: Trouble with simple card flip animation

Basically the "back" is never set to xzoom 0 (which it would need to be to "flip" after one second). transform test_flip: xzoom 1.0 on appear: xzoom 1.0 on show: xzoom 0.0 # <- add this pause 1.0 linear 1.25 xzoom 1.0 on hide: xzoom 1.0 linear 1.0 xzoom 0.0
by philat
Wed Aug 12, 2020 2:18 am
Forum: Ren'Py Questions and Announcements
Topic: Thoughts on condensing chat bubble code (Closed~)
Replies: 4
Views: 277

Re: Thoughts on condensing chat bubble code

I... would not do it this way in the first place. But I suppose the simplest way to cut down on some of this is using some math.

Code: Select all

add "sprites/bubble_1.png" xpos -20+(200*jill_talk) ypos 400 at boxpop # adjust numbers accordingly, I didn't look at it super hard.
by philat
Mon Jul 27, 2020 1:26 am
Forum: Ren'Py Questions and Announcements
Topic: Screen executes both if and else conditions
Replies: 5
Views: 221

Re: Screen executes both if and else conditions

Not in detail, but obviously the screen is being evaluated multiple times rather than once (as you can see there are very many printed values). Logically, after the first time, since you deleted the "im:" from the first statement, it would then fire the else. Since ren'py is doing work internally to...
by philat
Mon Jul 27, 2020 12:59 am
Forum: Ren'Py Questions and Announcements
Topic: [solved]Error when trying to receive a key from value
Replies: 1
Views: 182

Re: Error when trying to receive a key from value

Honestly stack overflow is better for python questions. I googled stack overflow for python max dictionary key and found the following works fine (obvs simplified -- and obvs with a random return if there are ties): default testdict = { 'fascism':1, 'communism':0, 'centrism':0, 'anarchism':0, 'conse...
by philat
Mon Jul 27, 2020 12:48 am
Forum: Ren'Py Questions and Announcements
Topic: Screen executes both if and else conditions
Replies: 5
Views: 221

Re: Screen executes both if and else conditions

There's a rather simpler way to do it. https://www.renpy.org/doc/html/menus.ht ... -arguments

Code: Select all

menu (screen="imageChoice"): # if you omit the menu argument, it would default to the regular choice screen
    "Say Statement"
    "Choice 1":
        pass
    "Choice 2":
        pass
by philat
Mon Jul 27, 2020 12:37 am
Forum: Ren'Py Questions and Announcements
Topic: Different screen animations based on starting or returning
Replies: 3
Views: 214

Re: Different screen animations based on starting or returning

Hard to say for sure without knowing more about your setup, but in principle, you can use screen parameters to apply anything conditionally. See basic example below (you can plug and play in a new project to see it run). screen test(d=True): # d for direction. True = left to right / False = right to...