Forum organization and occasional community-building.
Forum rules
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
pinkcateye
Newbie
Posts: 8 Joined: Mon Oct 30, 2023 4:58 pm
#1
Post
by pinkcateye » Tue Feb 13, 2024 1:08 pm
I'm trying to make an overlay function for my game in renpy. everything works except the transition part. whenever i run this in my game, it says "TypeError: __init__() got multiple values for argument 'transition'". any help is appreciated, thank you!
Code: Select all
init python:
class overlay:
def show(img,trans=None):
Show("overlayscreen", img, transition=trans)
def kill(trans=None):
Hide("overlayscreen", transition=trans)
screen overlayscreen(img):
zorder 100
add "[img]"
label start:
scene bg room
$ overlay.show("images/overlay/vignette.png")
"this is a nice vignette!"
return
pinkcateye
Newbie
Posts: 8 Joined: Mon Oct 30, 2023 4:58 pm
#2
Post
by pinkcateye » Tue Feb 13, 2024 2:07 pm
Update: i got it working.
Code: Select all
init python:
class overlay:
def show(img,trans=None):
renpy.show_screen("overlay",img)
renpy.transition(trans)
def kill(trans=None):
renpy.hide_screen("overlay",)
renpy.transition(trans)
screen overlayscreen(img):
zorder 100
add "[img]"
label start:
scene bg room
$ overlay.show("images/overlay/vignette.png")
"this is a nice vignette!"
return
Users browsing this forum: No registered users