-
Notifications
You must be signed in to change notification settings - Fork 0
Control Flow and Loops
egyptron edited this page Sep 24, 2026
·
1 revision
Awake Simple S1 structures conditional execution and repetitive routines using clear block tags.
Conditionals in Awake Simple S1 must be wrapped in statement(start) and statement(end) delimiters.
statement(start)
if variable <var_name> == <value> then
note: Statements executed when true
else
note: Statements executed when false
statement(end)
set variable player_hp = 0
statement(start)
if variable player_hp == 0 then
play sound "defeat"
display_error("You fainted!")
TerminateProcess()
else
display_success("Still ready for battle.")
statement(end)
To loop an operation a fixed number of times, use the repeat block. The header must conclude with a colon :.
repeat <N> times:
note: Loop body
finish loop;
set variable countdown = 5
repeat 5 times:
display("Detonation in: " + countdown)
decrease variable countdown by 1
wait 1 seconds
finish loop;
display_error("BOOM!")