Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
If understand you correctly, you can use Function action: value i[1] range i[2] changed Function(g.changed, arg1, arg2, key=value)
Or you can use renpy.curry, if you want to.
jeffster wrote: ↑Thu Sep 23, 2021 1:40 pm
How about using Bar Values?
I did look into that, but couldn't fund any substantial information or an example for it. even tried FieldValue() to no avail
jeffster wrote: ↑Thu Sep 23, 2021 1:40 pm
Otherwise, if a function doesn't accept enough arguments, I would pass them through global variables.
setting up global variables isn't feasible in my case, too many variables to declare.
Ocelot wrote: ↑Thu Sep 23, 2021 3:06 pm
If understand you correctly, you can use Function action: value i[1] range i[2] changed Function(g.changed, arg1, arg2, key=value)
Or you can use renpy.curry, if you want to.
you can try changed renpy.partial(g.changed, arg1)
partial returns a callable which, when invoked, calls other callable, passed as first argument, with combination of arguments passed during partial creation and during final call.