ENTRY INIT2 LOADFILE Story/bedroom.dms // USING extendedDefine DISABLE warnings USING audio as audio // DISABLE hostmsg [INIT2]{ "Text block" "Testing default text handler" g=DoMe(2) print("WHAT!!! $g$") } [A]{ "Yay it works!" } [DoMe:function(a)]{ "handle me" if a==0 then SKIP(0)|GOTO("end") return 1 ::end:: return a*SecondCall(a-1) } [SecondCall:function()]{ return 6 } /* [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]{ maintheme=audio:new("Audio/Nadia.ogg") maintheme:play(.5) ::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]{ "HI!" maintheme:setVolume(1) sleep(1) Fade(maintheme) "Yo" // JUMP("BEDROOM") } */