Help! Repeating pages.

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
Ksoles
Explorer
Explorer
Posts: 29
Joined: Tue Nov 14, 2023 7:48 pm

Help! Repeating pages.

Post by Ksoles »

Hi all,
Trying to make my first tease and im pretty noobie. Im trying to make a way to repeat a certain page X number of times before moving onto another page. EG, Page2 repeats 15 times before moving onto page3 etc. Thanks!
chual99
Explorer
Explorer
Posts: 54
Joined: Tue Jan 29, 2019 4:45 pm

Re: Help! Repeating pages.

Post by chual99 »

There's probably a couple ways of doing this, and the complexity depends on your coding experience.. but one simple way is as such:

Page1:
Somewhere in the page, create an "Eval" action and put x = 0. We're going to use this as your counter for the number of times repeated.

Page2:
Start with an "If" action. Put x===15 (you need 3 equal signs.)

Under the "Then" portion, create a "Goto" action and add "page3." (or whatever you want EOS to do once X is equal to 15.)

Under the "Else" portion, you're going to create an "Eval" action and put x=x+1. This will basically have the page add one to the counter every single time it arrives on this page. Follow the "Eval" action with a "Choice" or "Goto" action to continue back to page2. This will create your loop back to Page2 for 15 times (or however many you want.)
chual99
Explorer
Explorer
Posts: 54
Joined: Tue Jan 29, 2019 4:45 pm

Re: Help! Repeating pages.

Post by chual99 »

I'll also note that you could change up the order that you do things:

Page1
Eval x=0
Goto page2

Page2
Eval x=x+1
If x===15
Then
Goto page3
Else
Say "Blah blah blah"
Choice "Continue" page2

With the above format, since the counter adds one immediately upon reaching the page before testing whether you hit 15, it would mean that you actually run the page 14 times and on the 15th time, you are sent to page3. So you'd be 1 short of the goal of 15 iterations. But, of course, you can manipulate things and just change the "x===15" to "x===16" to create a situation where the player DOES do the page 15 times before moving forward.

As I said earlier, there's many ways of doing this. The particular technique you use is up to you :)
Ksoles
Explorer
Explorer
Posts: 29
Joined: Tue Nov 14, 2023 7:48 pm

Re: Help! Repeating pages.

Post by Ksoles »

Thank you so much! :wave:
Post Reply

Who is online

Users browsing this forum: Goddess Bianca and 8 guests