Implementation idea for branching or secret paths #3152
Labels
category:code
category:levels
involves:scripting
status:needs-discussion
Team member and developers need to discuss of decisions
type:idea
Me and @Rusty-Box discussed a solution to implement branching or secret paths in the worldmap in a more easier and consistent method, and I wanted to document it here.
In the EndSequence object, you will be able to specify which paths open on the worldmap by ticking certain tickboxes.

Each one of these tickboxes will turn a certain boolean with the name
<level filename>_<dir>
true in the Squirrelstate
table when the level is finished. For instance, when completing the upper path of "A Fork In The Road?",state.fork_in_road_up
will become true.Additionally,
state.fork_in_road_up_finished
will also become true. This boolean indicates if the path was just unlocked. This can be used to make a fancy fade animation that only runs once, for example.Heres how you would write that script:
In the level dot, you can run a script when a specific path opens.

These scripts only run if
<level filename>_<dir>
is true when the worldmap sector initializes. They essentially serve as a more convenient method of writing this in the worldmap sector initialization script:I'm unsure about certain things, though:
state.<level filename>_<dir>_finished
variable instead of putting it in thestate
table?The text was updated successfully, but these errors were encountered: