FANDOM


    The *elseif command (also spelled *elsif) is only used after an *if command to specify an alternative if the initial *if condition fails.

Usage

Here's how to use it:

*if happiness =< 10

    You're very sad.

    *finish

*elseif happiness > 10

    You're sad.

    *finish

*elseif happiness > 50

    You're moderately happy.

    *finish

*elseif (happiness > 70) and (happiness < 90)

    You're happy!

    *finish

*else

    You're very happy!

    *finish

This makes it so that only one of these conditions can be true. If the first condition isn't true (if happiness is equal to 30 for example) then it will check if the next *elseif condition is met, if it is not, it will move on to the next, and on and on until there are no more conditions to check. (In this example, if all the conditions fail, the output will default to "You're very happy!" because of the final *else statement.)


More commands
Choice *choice, *fake_choice, *disable_reuse, *hide_reuse, *allow_reuse, *selectable_if
Variable *create, *temp, *set, Arithmetic operators, *delete, *input_number, *input_text, *print, *rand
Conditional *if, *elseif, *else
Goto *label, *goto, *goto_scene, *goto_random_scene, *gosub, *gosub_scene, *finish
Formatting Bold text, Italic text, *image, *line_break, *page_break, *link, *stat_chart
Miscellaneous *comment, *scene_list, *title, *author, *achieve, *achievement, *check_achievements, *bug, *ending, *more_games, *share_this_game, *show_password, *script

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.