From 6a32d84d2400249e39c47b37056285e5ef45174d Mon Sep 17 00:00:00 2001 From: Iggy Date: Sun, 11 Aug 2024 23:13:20 -0300 Subject: [PATCH] Add missing logic to 'next_story_chapter' function Modify define statements --- game/storyline.rpy | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/game/storyline.rpy b/game/storyline.rpy index 3833f93..143e344 100644 --- a/game/storyline.rpy +++ b/game/storyline.rpy @@ -14,16 +14,15 @@ define ending_routes = { 1: ["chapter_11A", "chapter_12A", "chapter_12_5D", "chapter_13A", "chapter_14A"] } -# Index number for the current position of the general chapters array -define chapter_index = 0 - -# This will store the name of the label as a string -define current_chapter = None default chapters_array_length = len(general_chapters) - 1 -define ending_route_number = None -define ending_chapter_index = 0 +default chapter_index = 0 # Index number for the current position of the general chapters array + +default current_chapter = general_chapters[chapter_index] # This stores the name of the label as a string + +default ending_route_number = None +default ending_chapter_index = 0 init -1 python: @@ -51,6 +50,11 @@ init python: next_ending_chapter() return + chapter_index += 1 + current_chapter = general_chapters[chapter_index] + + renpy.call(current_chapter) + def is_end_of_chapters(): return chapter_index >= chapters_array_length