Context
In my game, I'm using the basic point-based system that works as such:
Code: Select all
label start:
$ boy1_points = 5
$ boy2_points = 5
$ boy3_points = 5
$ boy4_points = 5
$ girl1_points = 5
$ girl2_points = 5
Code: Select all
"I give girl2 some flowers."
$ girl2_points += 1
My Dilemma is This:
During periodic checkpoints in the game, I would like to reset all these character affection points to 0. Obviously, I can manually put in
Code: Select all
$ boy1_points = 0
$ boy2_points = 0
$ boy3_points = 0
$ boy4_points = 0... (and so on)
One of my Half-Baked Attempts at a Solution is This:
I tried the following (function? action?) for starters - not sure if I've just got the wrong syntax or if I'm even on the right track;
Code: Select all
init python:
def resetallPoints():
boy1_points = 0
boy2_points = 0
boy3_points = 0
boy4_points = 0
girl1_points = 0
girl2_points = 0
label start:
$ boy1_points = 5
$ girl1_points = 2
girl1 "Right now, you have [boy1_points] points with boy1 and [girl1_points] points with me."
girl1 "Let's go ahead and reset that..."
$ resetallPoints
girl1 "Now we have [boy1_points] and [girl1_points]!"
...but obviously running this just spat out an error. Thoughts? Alternatives? Links? Examples? I'll love you forever.