You can sort of do this in EOS, but it's not perfect, and whether or not the technique is suitable for your tease depends on what else you want to happen when the "Edged" button gets clicked. I'll go out on a limb here and say "nothing", meaning you want it to count the edge and do nothing else, but in EOS when you click the notification it also advances the actions on the page.Shattered wrote: Sun Jan 30, 2022 9:50 pm I think what I want should be possible, but I don't even know what its called to start googling![]()
I want a notification button that says 'edge' and when its clicked, it adds 1 to the users edge count, without disappearing.
So I imagine I want to set up this as something outside the script that whenever you press the button, it's called and replays itself.
How would one do this does anyone know?
I created a little demo here, and the script is in the spoiler below. I've initialized the edge count in the "init" module, but you could do that in an eval on the start page too if you want. Try the demo and follow the instructions, then try it again just clicking through the pages without clicking the edged button and you'll see the different possibilities. With a little creativity you could potentially compensate for the quirks of the method so it's not too painful.
The basic idea is that each page would have it's own notification section that counts edges. Each time you click the button it counts the edge and adds itself back. All you need to do is set something up that will handle what you think would be the most times someone might edge on a page. In my demo it supports up to 5 times, then you go to another page. You could easily expand that to handle 10 or more edges. I also copied that to "Counting Edges 2" and just dropped the "goto another page" from the final edge, so in that case the button just disappears and you get a message that you've edged the maximum times for that page.
Then you copy that into each page (easy enough if you edit a backup of the json code), and at the end of each page remove the notification so it starts fresh on the next page. This way you end up with a smaller chunk of code that gets repeated a bunch of times, but it's contained within the page so it's maybe a little easier to manage.
I did not experiment to confirm this, but conceivably on one page you could create a structure like this that handles say 100 edges, and just leave it there for all subsequent pages. The key is to handle what happens when you hit edge number 101, and see what happens on your other pages when you click it.
I think it makes more sense to have a smaller set on each page so you can handle hitting the max edges in a manner that's more in context to what's happening at that time in your tease.
Hope that helps, or at least gives you some food for thought.
PG
EOS Script in spoiler
This code only includes "Counting Edges" and not the additional "Counting Edges 2" I added later.
- Spoiler: show



