Skip to content

Commit

Permalink
Added HelloSpaghetti.gm9 sample script
Browse files Browse the repository at this point in the history
  • Loading branch information
d0k3 committed Dec 29, 2017
1 parent 4ade338 commit b20f235
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions HelloSpaghetti.gm9
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# GodMode9 "Spaghetti code sample"
# Tutorial script - read / run this to learn how it works
# last changed: 20171229
# author: d0k3


# choose example to try
labelsel "Choose example" spaghetti_*


# if-else-elif-end sample code
@spaghetti_ifelse_example

if ask "?set PREVIEW_MODE off?"
set PREVIEW_MODE off
elif ask "?set PREVIEW_MODE quick?"
set PREVIEW_MODE quick
elif ask "?set PREVIEW_MODE full?"
set PREVIEW_MODE full
elif ask "?set PREVIEW_MODE V:/GodMode9_splash.pcx?"
set PREVIEW_MODE V:/GodMode9_splash.pcx
elif ask "?set PREVIEW_MODE 'No preview for you, sorry'?"
set PREVIEW_MODE "No preview for you, sorry"
else
echo "**Nothing**"
end

if ask "Try this again?"
goto spaghetti_ifelse_example
end

goto outside


# labelsel sample code
@spaghetti_labelsel_example

@choice_Preview_off
set PREVIEW_MODE off
goto chooser

@choice_Preview_quick
set PREVIEW_MODE quick
goto chooser

@choice_Preview_full
set PREVIEW_MODE full
goto chooser

@choice_Preview_PCX
set PREVIEW_MODE V:/GodMode9_splash.pcx
goto chooser

@choice_Preview_custom
set PREVIEW_MODE "Your text can be here"
input -o "Enter anything:" PREVIEW_MODE
goto chooser

@choice_Leave_script
goto outside

@chooser
labelsel -o -s "Choose preview mode" choice_*
goto chooser

@outside

0 comments on commit b20f235

Please sign in to comment.