parseManager/test.dms
Ryan Ward 05cc166925 The function rework is done!
Finally, this took way too long to get working. Major change to how one interacts with the interperter. No need to implicetly catch each case, defaults are set and can be overridden if needed.
2019-06-25 23:13:19 -04:00

54 lines
1.0 KiB
Plaintext

ENTRY INIT
LOADFILE Story/bedroom.dms
USING threading
DISABLE warnings
USING audio as audio
// DISABLE hostmsg
[INIT]{
// The LOAD function will load variables and jump to the saved location. Be sure to setup runtime variables before the LOAD function is called!
WATCH("money","name","day","chapter","passive")
loaded,c,p = LOAD()
if loaded==false then JUMP("SETUP")|SKIP(0)
newThread("UPDATER","Thread_DisplayStats")
JUMP(c,p)
QUIT()
}
[SETUP]{
money = 100
name = getInput("Enter name: ")
day = 1
chapter = 1
passive = 1
newThread("UPDATER","Thread_DisplayStats")
SAVE()
JUMP("START")
}
[UPDATER]{
::loop::
EXECUTE("title $name$ $$money$ Day: $day$ Chap: $chapter$")
sleep(1)
money = money + passive
GOTO("loop")
}
[stop:function()]{
"hmm"
return 1,2
}
[Fade:function(obj)]{
// for x = 100, 0, -1 <
// sleep(.1)
// obj:setVolume(x/100)
// >
}
[START]{
maintheme=audio.new("Audio/Nadia.ogg")
maintheme:play(.5)
"HI!"
maintheme:setVolume(1)
sleep(1)
// Fade(maintheme)
"Yo"
// JUMP("BEDROOM")
}