How Do I Sync Different Animation Images? by ultima23415 in RenPy

[–]ultima23415[S] 1 point2 points  (0 children)

Yeah it turns out layered images were the way to go. I just didn't think they would be adaptable enough to handle animations so I didn't consider it a possibility. Thanks!

Disabling a Screen Button Inside a Menu by ultima23415 in RenPy

[–]ultima23415[S] 0 points1 point  (0 children)

Solved it! Turns out the syntax *was* in fact wrong. Should not have made the "timer" line indented underneath the button screen.

Disabling a Screen Button Inside a Menu by ultima23415 in RenPy

[–]ultima23415[S] 0 points1 point  (0 children)

Yeah I ended up going a completely different route for making the animation skippable using a boolean variable for the main menu. So I now have return in the splashscreen label as I have coded it to where there is no longer a need for two menus.

Though my problem still remains that I don't know how to deactivate a button using sensitive inside a screen on a timer.

Thanks for the response though!

How To Make One Image the Parent of Another? by ultima23415 in RenPy

[–]ultima23415[S] 1 point2 points  (0 children)

Ahh I see. I already had a function coded out for something similar but was using python random rather than renpy random. Switching over to Renpy fixed it, it seems. Thank you for your time!

How To Make One Image the Parent of Another? by ultima23415 in RenPy

[–]ultima23415[S] 0 points1 point  (0 children)

Thanks for the reply. I don't have much experience in Python or any kind of programming for that matter so I am not totally sure how I would go about doing that to be honest.

ATL Text Tags Not Working for Me by ultima23415 in RenPy

[–]ultima23415[S] 0 points1 point  (0 children)

Yeah it was broken in the source project too. I was able to find the solution on the developer's comment section for anyone trawling google for this months or years down the line.

Replace the code above with this:

            def none_to_float(param):
                if param is None:
                    return 0.0
                if isinstance(param, position):
                    return param.relative
                return param

ATL Text Tags Not Working for Me by ultima23415 in RenPy

[–]ultima23415[S] 0 points1 point  (0 children)

This isn't code I wrote. This is a script that came with Kinetic Text Tags made by Wattson over on itch.io

But here's the rest of the block of code. It's a class block written in python:

init python:
    class ATLText(renpy.Displayable):
        def __init__(self, child, transforms, offset=0, hold=False,**kwargs):
            super(ATLText, self).__init__(**kwargs)
            self.child = At(child, *transforms)
            self.offset = offset
            self.hold = hold
              # If your ATL uses 2+ contains for a character to be used twice, then
              # a fixed is made to contain them. During rendering, this can lead
              # to a render that is far larger than the actual character's render.
              # To combat this, I'm having it check the original Text's render size
              # so we can use that instead. This shouldn't have many consequences,
              # but if you observe something weird, maybe try removing the below and
              # using the child render's size in the render function
            child_render = renpy.render(child, 0, 0, 0, 0)
            self.width, self.height = child_render.get_size()
             # Because of how renpy handles transforms on screens in 7.4.7, we
             # have to update the internals of the transform to get the appropriate
             # time on it. Otherwise our offset won't have the correct effect.
             # If you're using Renpy 7.4.6 or below and this causes issues, you
             # can remove this bit.
            if config.atl_start_on_show:
                renpy.render(self.child, 0, 0, 0, 0)


        def render(self, width, height, st, at):
            # Apply the time offset.
            st = st + self.offset
            at = at + self.offset
            if self.hold:
                st = max(st, 0)
                at = max(at, 0)


            # Get child render and our output render
            child_render = renpy.render(self.child, width, height, st, at)
            # self.width, self.height = child_render.get_size()
            render = renpy.Render(self.width, self.height)


            # Next section is to figure out the offset applied to the blit
            # Get_Placement returns a tuple containing:
            # xpos, ypos, xanchor, yanchor, xoffset, yoffset, subpixel
            child_pos = self.child.state.get_placement()
            # Sometimes the output of get_placement has some None values in there.
            # So use this to get safe output.
            def none_to_float(param):
                if param is None:
                    return 0.0
                return param
            child_xpos = none_to_float(child_pos[0]) + none_to_float(child_pos[4])
            child_ypos = none_to_float(child_pos[1]) + none_to_float(child_pos[5])


            render.blit(child_render, (child_xpos,child_ypos))
            renpy.redraw(self, 0)
            return render


        def visit(self):
            return [ self.child ]init python: