You will always die at the end of a loop, but as long as you learned something new or got some new interactions, it's useful. If you get a bad end, you probably learned nothing. I want the player to actually be penalized for getting bad ends by
1) Having the player character get depressed if he dies too often without learning anything (this will affect dialogue and in extreme cases even prevents certain scenes).
2) Having the player character give up on escaping the loop if he is too depressed (Just some scenes to make the player feel bad, and then they can restart the last loop with OK-ish mood).
So he gets his mood down by messing up. And he gets his mood up by:
1) Experiencing a scene that has not been experienced before.
2) Learning new information.
So, the 'noob' way of doing this is like so:
Code: Select all
label start:
if not persistent.var_mood >= 0:
$ persistent.var_mood = 10
if persistent.var_mood == 0:
"You give up trying to fix the loop."
"(in more text)"
return
label scene_01:
if not persistent.scene_01_done == 1:
$ persistent.var_mood += 1
$ persistent.scene_01_done = 1
"Some stuff happens."
"To next scene"
label scene_02:
if not persistent.scene_02_done == 1:
$ persistent.var_mood += 1
$ persistent.scene_02_done = 1
"Some stuff happens."
menu:
"Do something good":
jump scene_03_good
"Do something bad":
jump scene_03_bad
"Use the code." if persistent.info_01 == 1
jump scene_04
label scene_03_good:
if not persistent.scene_03_done == 1:
$ persistent.var_mood += 1
$ persistent.scene_03_done = 1
"Scene happens."
"More scene happens."
"You learn something new!"
if not persistent.info_01 == 1
$ persistent.info_01 = 1
$ persistent.var_mood += 3
"Whoops, you died anyway. At least it wasn't for nothing."
label scene_03_bad:
"You fail to learn anything new. You died for nothing. Sad panda."
$ persistent.var_mood -= 4
if persistent.var_mood <= 0:
$ persistent.var_mood == 0
label scene_04
"etc."IS there a more efficient way? If not, is there a way to make the variables connect to the label they're under? So I can turn this...
Code: Select all
if not persistent.scene_03_done == 1:
$ persistent.var_mood += 3
$ persistent.scene_03_done = 1BONUS QUESTION:
Can the below code be replaced with "default persistent.var_mood = 10"? I'm not 100% sure what "default" really does.
Code: Select all
if not persistent.var_mood >= 0:
$ persistent.var_mood = 10