Skip to main content
Ctrl+K
ZQuest Classic  documentation - Home ZQuest Classic  documentation - Home
  • About
  • Tutorials
  • ZScript
  • About
  • Tutorials
  • ZScript

Section Navigation

Language

  • Introduction
  • Comments
  • Literals
  • Keywords and Operators
    • Pre- vs Post- increment/decrement
  • Declarations
    • Identifiers
    • Variables / Constants
    • Arrays / Strings
    • Functions
    • Namespaces
  • Types
    • Typedef Statements
    • Classes
      • Object Memory Management
    • Enums
  • Control Flow
    • If / Unless / Else
    • While / Until / Do
    • For Loops
    • Smart Loops (‘loop’)
    • Loop Else
    • Break / Continue
    • Switch / Case
  • Ranges
  • Scripts
    • Script Types
  • Annotations
  • Compiler Options
  • Compiler Directives

Globals

  • Global functions
  • Global constants
  • Audio
  • Debug
  • FileSystem
  • Game
  • Graphics
  • Hero
  • Input
  • Region
  • Screen
  • Text
  • Viewport
  • ZInfo

Classes

  • bitmap
  • bottledata
  • bottleshopdata
  • combodata
  • directory
  • dmapdata
  • dropsetdata
  • eweapon
  • ffc
  • file
  • genericdata
  • itemdata
  • itemsprite
  • lweapon
  • mapdata
  • messagedata
  • npc
  • npcdata
  • paldata
  • portal
  • randgen
  • savedportal
  • shopdata
  • sprite
  • spritedata
  • stack
  • subscreendata
  • subscreenpage
  • subscreenwidget
  • websocket

Libraries

  • std
    • std.cfg
    • ghostBasedMovement.zh
    • limits.zh
    • script_runners.zh
    • std_constants.zh
    • std_extension.zh
    • std_functions.zh
    • std_keyboard.zh
    • std_sideview.zh
    • string_constants.zh
    • string_functions.zh
  • ghost
    • ghost.zh
    • ghost2_common.zh
    • ghost2_deprecated.zh
    • ghost2_drawing.zh
    • ghost2_eweapon.zh
    • ghost2_eweaponDeath.zh
    • ghost2_eweaponMovement.zh
    • ghost2_flags.zh
    • ghost2_global.zh
    • ghost2_init.zh
    • ghost2_modification.zh
    • ghost2_movement.zh
    • ghost2_other.zh
    • ghost2_scripts.zs
    • ghost2_update.zh
    • ghostBasedMovement.zh
  • tango
    • tango.zh
    • tango_access.zh
    • tango_common.zh
    • tango_deprecated.zh
    • tango_drawing.zh
    • tango_font.zh
    • tango_functions.zh
    • tango_loading.zh
    • tango_loggingMinimal.zh
    • tango_menu.zh
    • tango_messages.zh
    • tango_metrics.zh
    • tango_processing.zh
    • tango_script.zs
    • tango_stringControlCode.zh
    • tango_style.zh
    • tango_user.zh
    • tango_validation.zh
  • gui
    • gui.zh
    • guizh_button.zh
    • guizh_checkbox.zh
    • guizh_common.zh
    • guizh_event.zh
    • guizh_label.zh
    • guizh_main.zh
    • guizh_radioButton.zh
    • guizh_root.zh
    • guizh_spinner.zh
    • guizh_types.zh
    • guizh_widget.zh
    • guizh_window.zh
  • EmilyMisc
    • EmilyMisc.zh
  • ZScript
  • Control Flow

Control Flow#

This section covers various statement types that can be used to control the execution flow of scripts. These are the foundational building blocks of scripting in ZScript, used to build whatever scripts you can imagine.

  • If / Unless / Else
  • While / Until / Do
  • For Loops
  • For-Each Loops
  • Smart Loops (‘loop’)
  • Loop Else
  • Break / Continue
  • Switch / Case

previous

Enums

next

If / Unless / Else

© Copyright 2025, ZQuest Classic Foundation.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.0.