So, at the start of each chapter in my game, I want to call a label that does a few things like stop the music and show a chapter title card, and to avoid having to copy and paste this same label multiple different times, I'd like to be able to call a single label and just swap out certain things like the chapter title and such as well as the label it jumps to when it's done. Problem is, I can't figure out how to pass the name of the next label as a parameter.
here's what I've got:
Code: Select all
label chapterintro(chapter,startlabel):
stop music
show screen chapter_titlecard(chapter) with fade
jump startlabel
I tried calling the label like this:
Code: Select all
call chapterintro("CHAPTER 01",chapter01_intro)
but I got an error telling me that chapter01_intro isn't defined.
so I tried calling the label like this:
Code: Select all
call chapterintro("CHAPTER 01","chapter01_intro")
but then I got an error telling me it couldn't find the label "startlabel".
I also tried doing both after changing the "jump" in chapterintro to "call", but no dice there either.
is this possible? how do you do this?
if it's not possible, then what's even the point of being able to pass parameters to a label?