Apparently I should be using the 'call' function instead of 'jump'.
Hi.
I have one main script file, and a events script file which the main script references.
The main script will be where the menus are, which jump to the various labels.
The events script is where the labels are, so the main script is supposed to reference then return to the main script file.
Example (very simplified)
Main script file:
Code: Select all
"Day 1"
"What should I do"
menu:
"eat":
jump eat_test
"sleep":
jump sleep_test
"Play":
jump play_test
"Day 2"
"What should I do"
menu:
"eat":
jump eat_test
"sleep":
jump sleep_test
"Play":
jump play_test
Code: Select all
label eat_test:
"I ate"
$ ate += 1
return
label sleep_test:
"I slept"
$ sleep += 1
return
label play_test:
"I played"
$ play += 1
return
Game reference events script file for the same events each day and add to the various variables.
Actual result:
Game brought back to main menu after choice selected on menu.
Am I using the return function wrongly, or is this how it is supposed to work?
If the return function is not to be used this way, may I know if there is anyway I can return to the main script after referencing the event script file? I do not want to use labels (ie "jump day1_ended", "label day1_ended:", etc) as the events are repeated each day, and I have 30+ days.
Thank you.