I need to Display the [Survival Points aka SP] of an Active Character since they can be selected at will. Example "[POV] has [SP] Remaining."
$ VICKY_POV = True
$ LEX_POV = False
$ Vicky_SP = 1
$ Lex_SP = 0
if VICKY_POV == True:
$ POV = "Vicky"
elif LEX_POV == False:
$ POV = "Lex"
else:
pass
################################### The Problem is Below ##############################
This doesn't work obviously, but it illustrates how I was trying to get to work.
if VICKY_POV == True:
SP = $ Vicky_SP
elif LEX_POV == True:
SP = $ Lex_SP
else:
pass
Displaying a Variable calling from Alternating Variables.
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.
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Displaying a Variable calling from Alternating Variables.
Using labels you can do it like this...
Code: Select all
default pov = "Vicky"
default vicky_sp = 0
default lex_sp = 1
label display(pov, sp):
"[pov] has [sp] Remaining."
return
label start:
python:
if pov == "Vicky": sp = vicky_sp
elif pov == "Lex": sp = lex_sp
call display(pov, sp)
Re: Displaying a Variable calling from Alternating Variables.
Yeah I've been going over tutorials. I was going about this wildly wrong. Sorry to bother everyone. It's just difficult sorting through all the sea of awkward tutorial and out of date information. Thank you.