Cool premise, I'm excited to see it once it's done!
So If I'm understanding you correctly, you want the player to go from Group 1 --> 2 --> 1 --> 2 etc. for a number of times. Once the player has done that many laps, Group 3 will be enabled and there will be a chance to go there. The one exception is that the player can never go from Group 1 --> Group 1 or Group 3 --> Group 3 or Group 2 --> Group 2. To make this work, we will have to get a little creative with the coding. I've made a test version myself to make sure this works and I'll share it here so you can look over it and try to replicate it in your tease.
Here's the code:
https://drive.google.com/file/d/1wrFxAM ... sp=sharing
Upload it into Eos
in a new tease (so you don't overwrite another tease!)
If you want to test it, start on the "page-helper" page.
The other relevant pages for your question are the "Group#" pages - the rest are little mini tutorials that I've been making for myself as I learn new things in Eos. They might be helpful for you too!
Basically, I set it up so that every page's GoTo sends the player to the page-helper page, which then decides where to send the player. This page will increase a variable "laps" by 1 every time it is visited. When the number of laps is less than a certain number, it will send the player from Group 1 --> Group 2 --> Group 1 etc. If the number of laps is above a certain number, it will enable the Group 3 pages, and it will essentially flip a coin to determine where to send the player when all three Groups are enabled. This decision is made by the code
Code: Select all
var myNumber = Math.floor((Math.random() * 2) + 1);
console.log('The number is %s', myNumber)
I chose this method because there is no set order of pages in your tease. Page-helper can take care of all the actions that have to happen behind the scenes between every page, and will make it easier to add more such actions if you choose to.
Some important notes:
- Spoiler: show
- Change the GoTo action of every page to go to the new helper page. You can copy and paste this GoTo to make it easier!
- Every page in Group 1 needs an additional Eval action:
This will allow the helper page know that the player was last at a Group 1 page. Every page in Group 2 needs the same eval, but setting that "pageid" variable to 2. Do the same for Group 3 pages.
- On the helper page, add the eval for increasing the variable "laps" by 1 (can be done with "laps++" or "laps = laps + 1")
- On the helper page, you'll need some If statements. This is where it starts getting complex, so I will let you look through the example

- Make sure to define your variables in the initial script! The only variables you should need for this are "pageid" (tells page-helper which Group the player was last in), "myNumber" (stores the result of the coin flips once Group 3 is enabled), and "laps" (tells page-helper how many pages the player has been to). You can find these variables in the initial script - find it by clicking the gear on the left.
Feel free to reply to me or DM me if you have any questions about how I did it or about anything else. I apologize for just throwing this example at you... I tried typing an explanation and I realized that it got too complicated for me to explain it clearly to you.
To anyone else reading this, feel free to download it as well - I think the mini tutorials can be helpful for anyone getting into Eos
