I'm trying to put a modular combat engine into my project, and it's coming along okay except for one thing. Before the combat I set a variable winlocation so the code knows where to go after the combat. But I can't seem to find the syntax to tell the call (or jump) command that winlocation is a variable, so it looks for a label with that name instead.
I'm new and missing something very basic in the syntax, aren't I?
Syntax? call variable label [SOLVED]
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.
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.
Syntax? call variable label [SOLVED]
Last edited by Coyotl on Thu Jan 30, 2014 8:55 pm, edited 1 time in total.
Re: Syntax? call variable label
You mean like:
?
Code: Select all
python:
if renpy.has_label(winlocation):
renpy.jump(winlocation)
Re: Syntax? call variable label
Thanks for your solution, xela.
Asceai, that was just what i was looking for. I knew there should be something to tell the command statement to treat it as a variable instead of a label.
I suspect that both of your solutions will be put to use at different points.
Much thanks to you both!
Asceai, that was just what i was looking for. I knew there should be something to tell the command statement to treat it as a variable instead of a label.
I suspect that both of your solutions will be put to use at different points.
Much thanks to you both!
Who is online
Users browsing this forum: Nozori_Games, Ocelot