Displaying images from passed arguments

Question

I'm trying to create a function that displays sprites in a particular fashion.

In essence, my code is as follows.

FILE_B.rpy

label displayFunc(num=0, sprite="sprite.png")
image img_a = sprite
show img_a

However, this causes the program to not run, citing that sprite is undefined.

Is there a solution?

Posted Dec 1, 2025, 4:09 AM UTC

26
Loading comments…