I am new to Ren'Py but I am interested in its use as a teaching aid for engineering students. I would like to have a PYTHON function to display its argument at the given position. This is my PYTHON function code that works
but there are at least 6 other ways it can be done. You'll prolly have to define images if you want to show them this way, you'll have to use Image/Transform/At if you load directly from path.
but there are at least 6 other ways it can be done. You'll prolly have to define images if you want to show them this way, you'll have to use Image/Transform/At if you load directly from path.
Thanks for this but this did not work for me. PYTHON complains that "Transform" is not defined.
import renpy.store as store
import renpy.exports as renpy
Should I import other renpy modules to get "Transform" recognised as a legit class by PYTHON? I could not find a place in the documentation where it says how renpy classes should be imported into PYTHON.
In answer to the question on what x and y are, I was calling this function as
I understand about pixel and relative positions, etc. I understand how the Position class works. I cannot get PYTHON recognise it (or any other RENPY variable or class name for that matter other than the ones I define).
xela wrote:I tend not to use .py files... what are your reasons?
Great question !! I do not know why.
I have just put it as a PYTHON function into an RPY file and the problem is solved.
So, the lesson is that one should use .py files only when one needs to do non-renpy things (like calculations, etc). Otherwise, I need to include python code in the RPY files so that the python code can access the RENPY names.