Page 1 of 1

So...how do I use routine class to add a delay to autoscrolling?

Posted: Sat Apr 17, 2021 4:29 pm
by FirestarPlays
I might be being stupid, but how exactly do I do this? :?

Re: So...how do I use routine class to add a delay to autoscrolling?

Posted: Sat Apr 17, 2021 5:01 pm
by Emral
Same as how you would have used eventu in the past, just with the word Routine instead of eventu now.
https://wohlsoft.ru/pgewiki/EventU.lua

Example:

Code: Select all

local function myRoutine()
	Routine.waitFrames(64) -- wait 1 second
	Text.showMessageBox("Hello!")
end

function onStart()
	Routine.run(myRoutine)
end

Re: So...how do I use routine class to add a delay to autoscrolling?

Posted: Sat Apr 17, 2021 6:26 pm
by FirestarPlays
Enjl wrote:
Sat Apr 17, 2021 5:01 pm
Same as how you would have used eventu in the past, just with the word Routine instead of eventu now.
https://wohlsoft.ru/pgewiki/EventU.lua

Example:

Code: Select all

local function myRoutine()
	Routine.waitFrames(64) -- wait 1 second
	Text.showMessageBox("Hello!")
end

function onStart()
	Routine.run(myRoutine)
end
Thank you Enjl! :D

Re: So...how do I use routine class to add a delay to autoscrolling?

Posted: Sun Apr 18, 2021 9:54 pm
by Hoeloe
Enjl wrote:
Sat Apr 17, 2021 5:01 pm
Routine.waitFrames(64) -- wait 1 second
Just as a note, it's much neater to do:

Code: Select all

Routine.wait(1)
For waiting one second.

Re: So...how do I use routine class to add a delay to autoscrolling?

Posted: Mon Apr 19, 2021 1:27 am
by Emral
Ah, right, that exists. I prefer going with waitFrames always so that I can tweak the timings on the fly.