[Solved] SetVariable to copy a variable value to another variable's value?
Posted: Tue Aug 16, 2022 5:18 pm
Hi all,
I'm trying to copy a variable's value to a persistent variable at the end of a game playthrough.
Basically, the process is this:
I've tried, but I'm somehow misunderstanding things.
This keeps giving me a syntax error, but I don't understand what I'm doing wrong. Can I not use another variable in the "value" field of SetVariable? That's kind of the whole point of what I'm trying to achieve.
I'm trying to copy a variable's value to a persistent variable at the end of a game playthrough.
Basically, the process is this:
- Take value from variable
- Copy variable to separate persistent variable
- Start new game
- Persistent variable's value is copied to non-persistent variable
- That variable is now the same value it was when you finished the game
I've tried, but I'm somehow misunderstanding things.
Code: Select all
python:
action SetVariable("persistent.v_mind_end", v_mind)
action SetVariable("persistent.v_heart_end", v_heart)
action SetVariable("persistent.v_soul_end", v_soul)
action SetVariable("persistent.v_guts_end", v_guts)
action SetVariable("persistent.v_quin_end", v_quin)