Hey, I've been playing around with EOS a bit, and between some basic programming knowledge and what's already on the forums I've been capable of figuring out most of what I wanted to do.
However, there's a few things I can't seem to find an answer to, and was wondering if someone of the more experienced creators could help me with:
1 is there a way to make infinitely repeating notifications?
For example: I want to make an 'edging' button that gives you a ten-second timeout, ads +1 to an invisible variable, and then lets you continue on where you left off(skipping the current timer in my testing, but I'm fine with that).
However, I can't/don't know how to make the button then recreate itself/never go away in the first place.
(or, I can make it recreate itself, but that would only work as many times as I can be bothered to nest it, which is really annoying and unclean besides)
2 is there a way to make a 'Disable' command automatically refer to the page it's on.
I want to make a tease with quite a few pages, which should appear in a random order - but only once each.
My plan is for this to happen with the page* -command, and simply disabling the pages which are done. However, if I do this individually, I'm almost sure to mess at least one up and it's annoying either way.
If someone has answers to these questions, they'd be much appreciated.
(and, in fact, if someone has some questions about eos I might be capable of answering, feel free to post them here.)
(in that case, be sure to read the 'Here are EOS tutorials' sticky thread first, though.)
Some slightly advanced EOS questions
-
arandommark
- Explorer

- Posts: 21
- Joined: Thu Apr 01, 2021 10:03 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
-
Domi-nation
- Explorer

- Posts: 38
- Joined: Fri Sep 29, 2017 8:35 am
Re: Some slightly advanced EOS questions
Question 1:
There is no real supported way of achieving this but there are two "hacks" you can use:
The first is the one you mentioned (nesting notifications).
The quickest to achieve that is nesting by copying the notification. For example you can create your notification template than copy paste it on the button pressed action. And each time you copy paste you copy the root notification.
That way the nesting increases exponentially (2, 4, 8, 16, 32, 64, ...)
EDIT: Don't go too hard on the nesting, I wanted to make one you could use as a template and went a bit high, maybe 128 and now my editor crashes as soon as I click on the tease containing that nested notification
The second is adding those in a pages that redirect to itself when the notification is pressed. If you have a dialog, you can create a step variable that will bring you back on the active dialog line. You need to initialize the step variable outside the page.
Then each say action would be in an if statement. That if statement would be structure like this:
You can add this function in the init script and call it in an eval where you need it:
There is no real supported way of achieving this but there are two "hacks" you can use:
The first is the one you mentioned (nesting notifications).
The quickest to achieve that is nesting by copying the notification. For example you can create your notification template than copy paste it on the button pressed action. And each time you copy paste you copy the root notification.
That way the nesting increases exponentially (2, 4, 8, 16, 32, 64, ...)
EDIT: Don't go too hard on the nesting, I wanted to make one you could use as a template and went a bit high, maybe 128 and now my editor crashes as soon as I click on the tease containing that nested notification
The second is adding those in a pages that redirect to itself when the notification is pressed. If you have a dialog, you can create a step variable that will bring you back on the active dialog line. You need to initialize the step variable outside the page.
Then each say action would be in an if statement. That if statement would be structure like this:
- If step === 0
- Say: Your dialog
- Eval: step ++
You can add this function in the init script and call it in an eval where you need it:
Code: Select all
function disableCurrentPage(){
var id = pages.getCurrentPageId()
pages.disable(id)
}
-
arandommark
- Explorer

- Posts: 21
- Joined: Thu Apr 01, 2021 10:03 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: Some slightly advanced EOS questions
Okay, that's annoying. Though if I semi-frequently refresh it I can get away with having only 8 or so nested.Domi-nation wrote: Sat Feb 19, 2022 1:04 pm Question 1:
There is no real supported way of achieving this but there are two "hacks" you can use:
The first is the one you mentioned (nesting notifications).
The quickest to achieve that is nesting by copying the notification. For example you can create your notification template than copy paste it on the button pressed action. And each time you copy paste you copy the root notification.
That way the nesting increases exponentially (2, 4, 8, 16, 32, 64, ...)
EDIT: Don't go too hard on the nesting, I wanted to make one you could use as a template and went a bit high, maybe 128 and now my editor crashes as soon as I click on the tease containing that nested notification![]()
And, sorry about my lack of knowledge, but would you mind explaining why the if function has three '='s instead of two, or is that just a typo?Domi-nation wrote: Sat Feb 19, 2022 1:04 pm The second is adding those in a pages that redirect to itself when the notification is pressed. If you have a dialog, you can create a step variable that will bring you back on the active dialog line. You need to initialize the step variable outside the page.
Then each say action would be in an if statement. That if statement would be structure like this:
- If step === 0
- Say: Your dialog
- Eval: step ++
Thanks, that's exactly what I was looking for!Domi-nation wrote: Sat Feb 19, 2022 1:04 pm Question 2:
You can add this function in the init script and call it in an eval where you need it:Code: Select all
function disableCurrentPage(){ var id = pages.getCurrentPageId() pages.disable(id) }
-
Domi-nation
- Explorer

- Posts: 38
- Joined: Fri Sep 29, 2017 8:35 am
Re: Some slightly advanced EOS questions
In javascript the '==' is the equality operator and the '===' is the strict equality operator.arandommark wrote: Sat Feb 19, 2022 2:43 pm And, sorry about my lack of knowledge, but would you mind explaining why the if function has three '='s instead of two, or is that just a typo?
The strict equality operator '===' will compare the values and their types. For example '10' === 10 will return false. That's because one is a string and the other is a number.
- '10' === 10 (returns false)
- 10 === 10 (returns true)
- 10 === 7 (returns false)
- 0 === false (returns false)
- '10' === 10 (returns true)
- 10 === 10 (returns true)
- 10 === 7 (returns false)
- 0 === false (returns true)
For example imagine your tease becomes very long and you forget you're using step in a page and somewhere else you have :
Code: Select all
step = step + ''And after that if you increment the number like this:
Code: Select all
step = step + 1And you will go from '10' to '101' for example.
If you used '==' instead of '===' the tease would go from line 10 to line 101 and you might not even notice it.
-
arandommark
- Explorer

- Posts: 21
- Joined: Thu Apr 01, 2021 10:03 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: Some slightly advanced EOS questions
Good to know. Thanks for the explanation!Domi-nation wrote: Sat Feb 19, 2022 3:57 pmIn javascript the '==' is the equality operator and the '===' is the strict equality operator.arandommark wrote: Sat Feb 19, 2022 2:43 pm And, sorry about my lack of knowledge, but would you mind explaining why the if function has three '='s instead of two, or is that just a typo?
The strict equality operator '===' will compare the values and their types. For example '10' === 10 will return false. That's because one is a string and the other is a number.
...
