Search found 1039 matches

by Kia
Sun Apr 28, 2024 5:37 am
Forum: Ren'Py Questions and Announcements
Topic: get click position on the button?
Replies: 2
Views: 32

Re: get click position on the button?

I guess you could just call a function the moment it is clicked. That function then utilizes renpy.get_mouse_pos() and calculates the rest depending on the position of the button and its size. That's what I've been doing. But I want to have freedom to place my button in arbitrary positions, utilizi...
by Kia
Sun Apr 28, 2024 3:54 am
Forum: Ren'Py Questions and Announcements
Topic: get click position on the button?
Replies: 2
Views: 32

get click position on the button?

I have a big button and I want to find out where it has been clicked in relation to it's top left. So far I've been positioning it manually, that way I know where my button starts at all times, this limits the use of vbox, hbox, paddings and drags. I wonder is there's an easy way to find where on th...
by Kia
Sun Apr 28, 2024 3:10 am
Forum: Ren'Py Questions and Announcements
Topic: How to add ability points to screen?
Replies: 1
Views: 106

Re: How to add ability points to screen?

You can use the `Function` action to run a python function when your button is clicked, and that function can check your variables, and change them if the conditions are met. The harder alternative is using `If` in your actions. You have to study screens a bit more and get familiar with the actions....
by Kia
Sun Apr 28, 2024 3:03 am
Forum: Ren'Py Questions and Announcements
Topic: Making a parallax effect react to the buttons focused rather than the mouse?
Replies: 2
Views: 223

Re: Making a parallax effect react to the buttons focused rather than the mouse?

I think you can use `hovered, unhovered` to trigger a function that moves your parallax, if you move mouse detection outside of your main code and have it receive the x,y coordination from those functions
by Kia
Sun Apr 28, 2024 2:58 am
Forum: Ren'Py Questions and Announcements
Topic: Two animation questions
Replies: 2
Views: 148

Re: Two animation questions

You can achieve the first by containing a `button` and a `text` inside a `fixed`, then abuse a time to run a function that changes the size and the text length. For the second, you can just use an `if...else` to swap between two objects with different animations. if is_shaking: add "image"...
by Kia
Sun Apr 28, 2024 2:47 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 1
Views: 84

Re: Making an imagebutton move from within python function

Transforms will give you lots of grief when it comes to complex animation, your best bet is using CDD for those cars: https://www.renpy.org/doc/html/cdd.html
by Kia
Sun Apr 28, 2024 2:43 am
Forum: Ren'Py Questions and Announcements
Topic: CDD Parallax Effect w/ Smoothness
Replies: 1
Views: 73

Re: CDD Parallax Effect w/ Smoothness

I usually get smooth movement by having variables like `x_target` and add to `x` a small amount till it reaches that target. But I'm sure there are better ways to larp between those values.
by Kia
Fri Mar 29, 2024 3:03 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] Using videos as button?
Replies: 5
Views: 778

Re: [solved] Using videos as button?

I personally would have just created a frame displaying the video, then placed an invisible button over top of that. With a little tweaking, this is also an option. My test was kind of the same, but for some reason, two videos placed over each other causes some odd behaviors, when it comes to apply...
by Kia
Thu Mar 28, 2024 2:06 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] Using videos as button?
Replies: 5
Views: 778

Re: Using videos as button?

Thank you Ocelot, it works like a charm. We have `side_mask` that ensures the video and its mask stay in sync, I imagine if we could do another split, we can fit two videos and two masks in the same video file, to use in buttons and such. But there aren't that many developers that are looking for a ...
by Kia
Tue Mar 26, 2024 2:13 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] Using videos as button?
Replies: 5
Views: 778

[solved] Using videos as button?

I'm trying to use two videos for hover and idle states of a button. The normal route of using them as `background` and `hover_background` will cause them reset when the button is hovered. As a workaround I've tried: screen video_test_screen: default over = 0 add "video_idle" add "vide...
by Kia
Sun Feb 04, 2024 3:13 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved... for now] Problem with ATLs applied to say screen and SideImage
Replies: 4
Views: 580

Re: Problem with ATLs applied to say screen and SideImage

I've noticed a similar behavior in some of my older screens too. Looks like interactions trigger some of the animations that didn't trigger in the old versions, I haven't looked into the issue though.
by Kia
Tue Oct 03, 2023 2:22 am
Forum: Creative Commons
Topic: 1080p wipes (image dissolve transitions)
Replies: 58
Views: 34259

Re: 1080p wipes (image dissolve transitions)

To the author... That is pretty much what I do these days. I only give specific permissions, and often to specific people. To be honest, I didn't read the CC license when I said they're CC, because I assumed that means free for commercial and non commercial use. Didn't know somebody will steal my w...
by Kia
Tue Sep 19, 2023 1:53 am
Forum: Creative Commons
Topic: 1080p wipes (image dissolve transitions)
Replies: 58
Views: 34259

Re: 1080p wipes (image dissolve transitions)

Here's some code I whipped up to show what I mean. That's a pretty neat function. I did write some code that allowed me to choose the images and adjust timing, but it was intended to help me with testing rather than being in a finished game. I assumed that the users will choose a handful of images ...
by Kia
Mon Jun 26, 2023 2:14 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved]properties 'anchor' and 'align' conflict with each other?
Replies: 7
Views: 705

Re: properties 'anchor' and 'align' conflict with each other?

In my opinion, keeping the pixel positioning for pos and percent positioning to align made much more sense, and makes for a code that's easier to read. But I should stop being a perfectionist, these small flaws are everywhere.
Thank you _ticlock_ ^^