-
Notifications
You must be signed in to change notification settings - Fork 119
Object Functions: Cutscenes and Level Loading
-
resume_level()
— Resume the most recently suspended level. See suspend_level(string) for details. -
suspend_level(string level_file_name)
— Similar to teleport('level.cfg'), but stores the previous level as level.suspended_level in the new level. Calling resume_level() will restore the old level. Multiple calls to suspend_level are allowed, and will stack appropriately. As opposed to using level.paused when drawing a pause dialog, suspend_level gives better isolation to the dialog code. However, you can't display a suspended level behind the pause dialog. For cutscenes, however, this isn't an issue. -
teleport(string dest_level, (optional)string dest_label, (optional)string transition, (optional)playable)
— teleports the player to a new level. The level is given bydest_level
, with null() for the current level. Ifdest_label
is given then the player will be teleported to the object in the destination level with that label. If transition is given, it names a type of transition (such as'flip'
or'fade'
) which indicates the kind of visual effect to use for the transition. If a playable is specified it is placed in the level instead of the current one. If no_move_to_standing is set to true, rather than auto-positioning the player on the ground under/above the target, the player will appear at precisely the position of the destination object - e.g. this is useful if they need to fall out of a pipe or hole coming out of the ceiling.
-
load_game()
— loads the saved game -
load_game(transition)
— loads the saved game. If transition (a string) is given, it will use that type of transition. -
can_load_game()
— returns true if there is a saved game available to load -
checkpoint_game()
— saves a checkpoint of the game -
save_game()
— saves the current game state -
set_save_slot((optional) int slot)
— Allows the user to select the save slot, if no slot is specified a dialog is displayed. -
get_save_document(int slot)
— gets the FFL document for the save in the given slot
-
show_modal(dialog)
— Displays a modal dialog on the screen. -
speech_dialog(...)
— schedules a sequence of speech dialogs to be shown modally. Arguments may include a list of strings, which contain text. An integer which sets the duration of the dialog. An object which sets the speaker. A string by itself indicates an option that should be shown for the player to select from. A string should be followed by a list of commands that will be executed should the player choose that option. -
paused_speech_dialog(...)
: Likespeech_dialog()
, except the game is paused while the dialog is displayed. -
transient_speech_dialog(...)
— schedules a sequence of speech dialogs to be shown. Arguments may include a list of strings, which contain text. An integer which sets the duration of the dialog. An object which sets the speaker. -
begin_skip_dialog_sequence()
— command that will cause everything up until the next timeend_skip_dialog_sequence()
is called to be considered a single storyline sequence. If the player selects to skip the sequence between now and then everything up until the call toend_skip_dialog_sequence()
will be skipped. -
end_skip_dialog_sequence()
— ends the sequence begun withbegin_skip_dialog_sequence()
.
-
title(string text, int duration=50)
— shows level title text on the screen for duration cycles -
end_game()
— Displays 'to be continued...', and returns to titlescreen. -
begin_script(string id)
— begins the script with the given ID. -
end_script()
— ends the most recent script to have begun. -
dialog(obj, template)
— Creates a dialog given an object to operate on and a template for the dialog.
More help can be found via chat in Frogatto's Discord server, or by posting on the forums. This wiki is not a complete reference. Thank you for reading! You're the best. 🙂