Here are EOS tutorials

All about the past, current and future webteases and the art of webteasing in general.
---
User avatar
Shattered
Experimentor
Experimentor
Posts: 1391
Joined: Fri Jan 11, 2013 6:41 pm
I am a: Switch
Location: United Kingdom

Re: Here are EOS tutorials

Post by Shattered »

I seem to recall a way to make a say action be from multiple random ones via storing them in the init script...anyone remember? :lol:
undeniable_denial
Explorer At Heart
Explorer At Heart
Posts: 109
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Here are EOS tutorials

Post by undeniable_denial »

Shattered wrote: Tue Apr 15, 2025 8:25 pm I seem to recall a way to make a say action be from multiple random ones via storing them in the init script...anyone remember? :lol:
Perhaps you could be a little bit more specific, particularly about the "random" part? I'm assuming you have a list of texts. Do you want:
A) All of them in a random order
B) Not necessarily all of them and possibly repeating
C) Something else?
User avatar
Shattered
Experimentor
Experimentor
Posts: 1391
Joined: Fri Jan 11, 2013 6:41 pm
I am a: Switch
Location: United Kingdom

Re: Here are EOS tutorials

Post by Shattered »

undeniable_denial wrote: Tue Apr 22, 2025 11:47 am
Shattered wrote: Tue Apr 15, 2025 8:25 pm I seem to recall a way to make a say action be from multiple random ones via storing them in the init script...anyone remember? :lol:
Perhaps you could be a little bit more specific, particularly about the "random" part? I'm assuming you have a list of texts. Do you want:
A) All of them in a random order
B) Not necessarily all of them and possibly repeating
C) Something else?
B more or less, you return to the same page and it says something that could be different, could be the same
undeniable_denial
Explorer At Heart
Explorer At Heart
Posts: 109
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Here are EOS tutorials

Post by undeniable_denial »

Shattered wrote: Tue Apr 22, 2025 7:04 pm B more or less, you return to the same page and it says something that could be different, could be the same
Something like this maybe:

Code: Select all

function myRandomText() {
    texts=[
        "Nice weather today."
        ,
        "Why are you looking at me like that?"        
    ];
    return texts[Math.floor(Math.random()*texts.length)];
}
Then put this inside an eval-tag in a say action:

Code: Select all

myRandomText()
Couple of notes:
- Make sure the texts are in quotes and seperated by a comma. (No comma after the last one)
- If you want a line break use the html-code "<br>". Don't put actual line breaks in the quotes.
- Math.random generates a number between 0 and 0.99999...
- When you multiply that by the number of texts (texts.length) and round that down ("floor"), then you get indices from 0 to length-1. So you can just have any number of texts, the code can handle it.
UrbanJames
Curious Newbie
Curious Newbie
Posts: 2
Joined: Sat Mar 15, 2025 3:57 pm

Re: Here are EOS tutorials

Post by UrbanJames »

Is there any way to have dialog that plays during a timer?
undeniable_denial
Explorer At Heart
Explorer At Heart
Posts: 109
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Here are EOS tutorials

Post by undeniable_denial »

UrbanJames wrote: Sun Apr 27, 2025 7:57 pm Is there any way to have dialog that plays during a timer?
turn on the timer's "asynchronous" mode
UrbanJames
Curious Newbie
Curious Newbie
Posts: 2
Joined: Sat Mar 15, 2025 3:57 pm

Re: Here are EOS tutorials

Post by UrbanJames »

undeniable_denial wrote: Sun Apr 27, 2025 8:57 pm
UrbanJames wrote: Sun Apr 27, 2025 7:57 pm Is there any way to have dialog that plays during a timer?
turn on the timer's "asynchronous" mode
Ok, many thanks!

So I tested it for a bit and got it to work by using: "Timer (Asynchronous)" that runs an empty eval after the time is up > "say" action with a pause timer that is longer then the "Timer" action > rest of page
Is this the easiest way to do it?
User avatar
PlayfulGuy
Experimentor
Experimentor
Posts: 1068
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Here are EOS tutorials

Post by PlayfulGuy »

UrbanJames wrote: Sun Apr 27, 2025 9:43 pm
undeniable_denial wrote: Sun Apr 27, 2025 8:57 pm
UrbanJames wrote: Sun Apr 27, 2025 7:57 pm Is there any way to have dialog that plays during a timer?
turn on the timer's "asynchronous" mode
Ok, many thanks!

So I tested it for a bit and got it to work by using: "Timer (Asynchronous)" that runs an empty eval after the time is up > "say" action with a pause timer that is longer then the "Timer" action > rest of page
Is this the easiest way to do it?
You shouldn't need an empty eval.

The Async timer can run other say actions, or even just contain a goto command to go to another page. These will execute when its time expires.

Then following the async timer you could have a series of timed say actions, image changes followed by another non-async timer, or whatever. If the total time of those actions is less than the time on the async timer, those commands following the async timer will execute, then the command(s) "contained in" the async timer will execute when its timer expires.

PG
User avatar
Shattered
Experimentor
Experimentor
Posts: 1391
Joined: Fri Jan 11, 2013 6:41 pm
I am a: Switch
Location: United Kingdom

Re: Here are EOS tutorials

Post by Shattered »

undeniable_denial wrote: Thu Apr 24, 2025 4:00 pm
Shattered wrote: Tue Apr 22, 2025 7:04 pm B more or less, you return to the same page and it says something that could be different, could be the same
Something like this maybe:

Code: Select all

function myRandomText() {
    texts=[
        "Nice weather today."
        ,
        "Why are you looking at me like that?"        
    ];
    return texts[Math.floor(Math.random()*texts.length)];
}
Then put this inside an eval-tag in a say action:

Code: Select all

myRandomText()
Couple of notes:
- Make sure the texts are in quotes and seperated by a comma. (No comma after the last one)
- If you want a line break use the html-code "<br>". Don't put actual line breaks in the quotes.
- Math.random generates a number between 0 and 0.99999...
- When you multiply that by the number of texts (texts.length) and round that down ("floor"), then you get indices from 0 to length-1. So you can just have any number of texts, the code can handle it.
Perfect thanks!
User avatar
47dahc
Explorer At Heart
Explorer At Heart
Posts: 286
Joined: Mon Aug 03, 2020 1:43 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Here are EOS tutorials

Post by 47dahc »

I'm trying to write my first tease and I ask what the players name is on the Start page using the prompt action "name". When I do a preview of the tease from the Start page, it works great and goes through with no issues. However, when I preview another page further in where it says the users "name", it hangs because the "name" was not set. I don't want to test from the beginning of the tease every time I add a page and use "name" in a Say command. I tried adding "name=Dahc" to the init script but it's not working. I can just not use "name" on the page while testing but then I need to go back and edit each Say command afterwards. How do you test individual pages where the players name is set at the beginning of a tease and is used without having to go back and redo all the Say commands within pages. I thought adding it to the init script would work then when I'm done and ready to publish, I could just remove that line.
Creator of MetroVerter The Metronome to Tcode converter
My Guide on How to create and mix estim surround videos
My guide on Setup TeaseAI - Awakening with Restim
User avatar
PlayfulGuy
Experimentor
Experimentor
Posts: 1068
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Here are EOS tutorials

Post by PlayfulGuy »

47dahc wrote: Fri May 23, 2025 5:07 pm I'm trying to write my first tease and I ask what the players name is on the Start page using the prompt action "name". When I do a preview of the tease from the Start page, it works great and goes through with no issues. However, when I preview another page further in where it says the users "name", it hangs because the "name" was not set. I don't want to test from the beginning of the tease every time I add a page and use "name" in a Say command. I tried adding "name=Dahc" to the init script but it's not working. I can just not use "name" on the page while testing but then I need to go back and edit each Say command afterwards. How do you test individual pages where the players name is set at the beginning of a tease and is used without having to go back and redo all the Say commands within pages. I thought adding it to the init script would work then when I'm done and ready to publish, I could just remove that line.
I'm not sure I follow what you did 100%, but when you prompt for the users name, the input gets stored in a variable (you specify the name of the variable in the prompt command). In your subsequent Say actions you need to include an eval that references the variable. If you've not done that, unfortunately you will need to go back and edit those actions. That's just how variables work in EOS.

I made a demo tease for someone else. You can see it here: https://milovana.com/webteases/showteas ... fe8db66ea6

Hope that helps.

PG
Screenshot.jpg
Screenshot.jpg (134.03 KiB) Viewed 7523 times
User avatar
47dahc
Explorer At Heart
Explorer At Heart
Posts: 286
Joined: Mon Aug 03, 2020 1:43 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Here are EOS tutorials

Post by 47dahc »

PlayfulGuy wrote: Fri May 23, 2025 5:36 pm
Spoiler: show
47dahc wrote: Fri May 23, 2025 5:07 pm I'm trying to write my first tease and I ask what the players name is on the Start page using the prompt action "name". When I do a preview of the tease from the Start page, it works great and goes through with no issues. However, when I preview another page further in where it says the users "name", it hangs because the "name" was not set. I don't want to test from the beginning of the tease every time I add a page and use "name" in a Say command. I tried adding "name=Dahc" to the init script but it's not working. I can just not use "name" on the page while testing but then I need to go back and edit each Say command afterwards. How do you test individual pages where the players name is set at the beginning of a tease and is used without having to go back and redo all the Say commands within pages. I thought adding it to the init script would work then when I'm done and ready to publish, I could just remove that line.
I'm not sure I follow what you did 100%, but when you prompt for the users name, the input gets stored in a variable (you specify the name of the variable in the prompt command). In your subsequent Say actions you need to include an eval that references the variable. If you've not done that, unfortunately you will need to go back and edit those actions. That's just how variables work in EOS.

I made a demo tease for someone else. You can see it here: https://milovana.com/webteases/showteas ... fe8db66ea6

Hope that helps.

PG

Screenshot.jpg
That's pretty much what I did, I think.

From my Start page:
Spoiler: show
Start Page.png
Start Page.png (23.89 KiB) Viewed 7518 times
If I do a preview (eye icon at the top of the page) from this page, it goes through the tease just fine and will flow through other pages as well.
Spoiler: show
Start Page_preview.png
Start Page_preview.png (420.73 KiB) Viewed 7518 times
If I'm editing another page within the tease and select the eye icon to preview and test it from that page, it hangs at the Say command where I use "name":
Spoiler: show
TahliaWarmup.png
TahliaWarmup.png (50.44 KiB) Viewed 7518 times
I can only assume it hangs because I'm testing the page without the variable being set because I'm basically skipping the Start page where it will be set in the final published tease.

So I guess my question is, how can I set a variable in the init script that will automatically set the name so I can test individual pages without needing to preview from the Start page and go through the whole tease to get to the page I want to test? I plan on having variable pages using the asterisk (page*) so starting from the beginning each time might not take me to the page I want to test.
Creator of MetroVerter The Metronome to Tcode converter
My Guide on How to create and mix estim surround videos
My guide on Setup TeaseAI - Awakening with Restim
User avatar
47dahc
Explorer At Heart
Explorer At Heart
Posts: 286
Joined: Mon Aug 03, 2020 1:43 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Here are EOS tutorials

Post by 47dahc »

47dahc wrote: Fri May 23, 2025 6:09 pm So I guess my question is, how can I set a variable in the init script that will automatically set the name so I can test individual pages without needing to preview from the Start page and go through the whole tease to get to the page I want to test? I plan on having variable pages using the asterisk (page*) so starting from the beginning each time might not take me to the page I want to test.
I figured it out.

I added

Code: Select all

var name = "Dahc"
to the init script and it works now. Will just have to remove it before publishing.
Creator of MetroVerter The Metronome to Tcode converter
My Guide on How to create and mix estim surround videos
My guide on Setup TeaseAI - Awakening with Restim
User avatar
PlayfulGuy
Experimentor
Experimentor
Posts: 1068
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Here are EOS tutorials

Post by PlayfulGuy »

47dahc wrote: Fri May 23, 2025 6:19 pm
47dahc wrote: Fri May 23, 2025 6:09 pm So I guess my question is, how can I set a variable in the init script that will automatically set the name so I can test individual pages without needing to preview from the Start page and go through the whole tease to get to the page I want to test? I plan on having variable pages using the asterisk (page*) so starting from the beginning each time might not take me to the page I want to test.
I figured it out.

I added

Code: Select all

var name = "Dahc"
to the init script and it works now. Will just have to remove it before publishing.

Excellent!

It shouldn't be necessary to remove it before publishing since the init script only runs once when the tease is loaded. When you go through the tease normally and prompt for a name, the entered name should override what was set in the init script. You can test that pretty easily by setting one name in the init script, then enter a different one at the prompt and see what happens. Or in your ini script just set it to an empty string (var name = "").

Love your profile pic by the way!

PG
User avatar
Roxas20
Explorer
Explorer
Posts: 17
Joined: Tue May 20, 2025 5:19 am
Gender: Male
Sexual Orientation: Straight

Re: Here are EOS tutorials

Post by Roxas20 »

Is there a place where you can share demos of your tease to get people's opinions
Post Reply