Hi, I just started messing around with EoS editor in the past 2 days and I was wondering if there is a way to make some kind of async routine that checks if a condition is met.
Timers and Notifications aren't exactly what I want because they only run once, I want something iterative, like a setInterval.
Is there some hack I'm missing?
Iterative timer?
Re: Iterative timer?
I found the openEos project viewtopic.php?f=26&t=23558
It supports timeouts and all kinds of stuff through scripting, really helpful! (https://github.com/fapnip/openeos/wiki/Native-Timers)
EoS should support this stuff natively tho
It supports timeouts and all kinds of stuff through scripting, really helpful! (https://github.com/fapnip/openeos/wiki/Native-Timers)
EoS should support this stuff natively tho
Last edited by zpigz on Sun Dec 27, 2020 6:23 pm, edited 1 time in total.
Re: Iterative timer?
Yeah, I wish EOS had all of that, and more. But most of my requests went unanswered. So I wrote OpenEOS.
Only way to do what you want in standard EOS is to have a timer on a page that constantly recalls itself in a loop. (At end of timer, pages.goto('my-timer-page'))
Of course, all your say and choice bubbles are cleared on every page change in EOS, so you'd need to use Notifications for any choice/prompt.
(Be careful with setInterval in OpenEOS. Remember to clear it!)
Edit:
Also, in addition to setInterval in OpenEOS, there's also Timer Action Overrides that allow you to re-run a timer x number of times.
Only way to do what you want in standard EOS is to have a timer on a page that constantly recalls itself in a loop. (At end of timer, pages.goto('my-timer-page'))
Of course, all your say and choice bubbles are cleared on every page change in EOS, so you'd need to use Notifications for any choice/prompt.
(Be careful with setInterval in OpenEOS. Remember to clear it!)
Edit:
Also, in addition to setInterval in OpenEOS, there's also Timer Action Overrides that allow you to re-run a timer x number of times.
Last edited by fapnip on Sun Dec 27, 2020 10:25 pm, edited 3 times in total.
Re: Iterative timer?
BTW: No need to publish a tease to test it on OpenEOS. Simply plug in the tease ID and key from the "Share via link" link in the URL.
So, instead of https://oeos.ml/?id=48259 for your timer test, you would use https://oeos.ml/?id=48259&key=[key from your share via link URL here]
If you do publish an OpenEOS tease, you'll need to make sure you wrap OpenEOS only stuff in a check to make sure it doesn't crash standard EOS.
In the init script you would do:
In your start page you would add an EVAL action as the first action with:
Then create a page named "no-oeos", and add a note about requiring OpenEOS, with a link to your OpenEOS tease. (Standard EOS doesn't support actual links**, so you'll need to instruct then to copy/paste the URL.)
** OpenEOS does support some links, but only if the href starts with https://milovana.com, https://oeos.ml and https://github.com/fapnip
(TLDR: Unpublish your OpenEOS demo tease until it's ready.)
So, instead of https://oeos.ml/?id=48259 for your timer test, you would use https://oeos.ml/?id=48259&key=[key from your share via link URL here]
If you do publish an OpenEOS tease, you'll need to make sure you wrap OpenEOS only stuff in a check to make sure it doesn't crash standard EOS.
In the init script you would do:
Code: Select all
if (pages.oeosVersion) {
// Do my OpenEOS only stuff
}
Code: Select all
if (!pages.oeosVersion) {
pages.goto('no-oeos')
}
** OpenEOS does support some links, but only if the href starts with https://milovana.com, https://oeos.ml and https://github.com/fapnip
(TLDR: Unpublish your OpenEOS demo tease until it's ready.)
Re: Iterative timer?
Ooh, thank you!fapnip wrote: ↑Sun Dec 27, 2020 9:24 pm BTW: No need to publish a tease to test it on OpenEOS. Simply plug in the tease ID and key from the "Share via link" link in the URL.
So, instead of https://oeos.ml/?id=48259 for your timer test, you would use https://oeos.ml/?id=48259&key=[key from your share via link URL here]
If you do publish an OpenEOS tease, you'll need to make sure you wrap OpenEOS only stuff in a check to make sure it doesn't crash standard EOS.
In the init script you would do:In your start page you would add an EVAL action as the first action with:Code: Select all
if (pages.oeosVersion) { // Do my OpenEOS only stuff }
Then create a page named "no-oeos", and add a note about requiring OpenEOS, with a link to your OpenEOS tease. (Standard EOS doesn't support actual links**, so you'll need to instruct then to copy/paste the URL.)Code: Select all
if (!pages.oeosVersion) { pages.goto('no-oeos') }
** OpenEOS does support some links, but only if the href starts with https://milovana.com, https://oeos.ml and https://github.com/fapnip
(TLDR: Unpublish your OpenEOS demo tease until it's ready.)
That's a real saver :)
I'm not actually interested in making it vanilla EoS compatible atm, but that's really usefull info!
BTW is that in the Github wiki? couldn't find it.
Re: Iterative timer?
Ok I'm just dumb, the share link with the key is from the vanilla EoS
Well, at least now I don't need to publish garbage xD, thanks fapnip!
Well, at least now I don't need to publish garbage xD, thanks fapnip!
Re: Iterative timer?
pages.oeosVersion should be in the Page Manager section on the wiki, though in this case we're only testing if the function exists as a way of testing if we're running on OpenEOS, not checking the actual version. (It is used in many of the demo teases.)
The info about using your tease id & key should be on the first page of the wiki, though it doesn't explicitly tell you to grab it from the share via link area.
You'll want to make sure the tease at least can get to a "Requires OpenEOS" page of some sort for when you eventually publish it, as your tease will get very little traffic if you don't.
Also, feel free to create a Github account and edit the wiki where needed! The less time I spend editing the wiki, the more time I have available to keep adding features to OpenEOS.
Who is online
Users browsing this forum: No registered users and 4 guests