Example:
Code: Select all
var object = {
key: function() {return someVariable === true},
};
console.log(object.key); // doesn't work
console.log(object.key.toString()); // doesn't work
console.dir(object.key); // doesn't work
Code: Select all
var object = {
key: function() {return someVariable === true},
};
console.log(object.key); // doesn't work
console.log(object.key.toString()); // doesn't work
console.dir(object.key); // doesn't work

I don't understand why you would code something like you show in that example,Pseudonym wrote: Sat Dec 07, 2024 8:26 pm Is there a way to log value of a function in EoS?
Example:
Code: Select all
var object = { key: function() {return someVariable === true}, }; console.log(object.key); // doesn't work console.log(object.key.toString()); // doesn't work console.dir(object.key); // doesn't work
Code: Select all
console.log( object.key() )Probably because I'm not that great at programming.PlayfulGuy wrote: Sat Dec 07, 2024 10:15 pm I don't understand why you would code something like you show in that example...


The sample code you posted appears to be python, not javascript.ccgssdtttew wrote: Sun Dec 08, 2024 5:28 am Anyone here has a link for the metronome mp3 sound that sounds like a heart beat? I dont really like the sounds from metronomer.
Also is the scripts in the same as java? I was trying to google java scripts and copy paste them in, but couldnt get them to work.
For example, i wanted to display what Day it was (i.e. Monday, Tuesday, etc.). But I cant seem to get it to work, only having the "new Date().getDay" gets me a numerical value. I tried to copy this from internet:
- Spoiler: show
Code: Select all
//-------------------------------------------------------------------
function weekday() {
// Returns the current weekday name
var weekdays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
var name = "invalid day";
var n = new Date().getDay();
if ( n >= 0 && n < 7 ) name = weekdays[n];
return name;
}

Thank you! Ill try that out later. And oops, I mixed that up then. Got it and thanks for noticing xd


You use a say action to say what you want the user to enter (name etc.), then a prompt action to get the information. In the prompt action you specify a name for the variable. You can then refer to that variable in say actions using an "eval" in the say text.Kaleb wrote: Thu Jan 09, 2025 2:59 pm I need help asap
How do I do "what's your name" then ones I add my name in the "promt", my name should be in the "say" like asking the user their name, how do i do that?
sorry for my bad english
Here is API reference:CorruptedSigil wrote: Sat Feb 15, 2025 12:34 am Hey everyone,
I’m looking for some help understanding the storage module. How exactly does it work? Could someone give me a brief explanation along with a simple example of how to use it? Also, what kind of data can it store, and are there any capacity or limit restrictions I should be aware of?
Thanks in advance!

I've not tested it myself, but I have seen several authors update teases after publication to correct errors etc, so that's certainly possible, and I'm pretty certain that publishing is update friendly. Unless another author who has tested this chimes in, the only way to know for sure is to test it.Pseudonym wrote: Fri Feb 21, 2025 7:30 pm I'm very close to releasing alpha version of my new tease. I was able to code the teaseStorage saving and loading in a way that should be backward-compatible with updates so that players don't lose their progress when new version is released.
The issue is that I don't exactly know how publishing a tease in EoS works.
- Does publishing creates a separate "copy" of the tease that is unaffected by changes made after publishing? Can then be the published tease updated by publishing it again? In other words, is publishing a tease update-friendly in a way that doesn't destroy player's progress after update?
- Or does publishing work the same way as sharing the tease via link? Meaning no copy + any changes made to the tease are visible to players the next time they load the tease.
I would love to test publishing, but I'm reluctant to create, test, delete... teases and mess with this site and annoy people.![]()

Code: Select all
// Initial Script
var girlA_completed = false // For first time playthrough, not completed yet
var girlA_completed = teaseStorage.getItem("girlA_completed") // Checking if player has actually completed her
Code: Select all
// Page 1 finish with girl A and storing it
var girlA_completed = true
teaseStorage.setItem("girlA_completed", girlA_completed)

I'm no expert on the teaseStorage feature, but I know it's fairly limited in how much you can store, and other authors have developed methods for increasing that (fapnip maybe?).ccgssdtttew wrote: Sun Mar 09, 2025 5:48 pm Can someone share a simple code for me to expand/adapt? Im trying to work with storage function, if you've played Dreamer by MetalLife, I want to make it so that an ending with "girlA" will leave a record in a gallery (i.e. 1 out of 10 girls).
- Whats the code in initial script? So if I have 100 girls... do i need 100 separate storage lines to keep track?- Whats the end code, for example of page 1 after finishing with her,Code: Select all
// Initial Script var girlA_completed = false // For first time playthrough, not completed yet var girlA_completed = teaseStorage.getItem("girlA_completed") // Checking if player has actually completed herCode: Select all
// Page 1 finish with girl A and storing it var girlA_completed = true teaseStorage.setItem("girlA_completed", girlA_completed)
Code: Select all
// Initial script
girlsVisited = teaseStorage.getItem("girlsVisited") || []; // Load last saved state, or start with empty list if no previous save
Code: Select all
// Assuming Page 1 is girl 1. When finished
girlsVisited[1] = true; // You need to manually set and track the girl number for each girl.
teaseStorage.setItem("girlsVisited", girlsVisited)
Code: Select all
// Has girl 5 been visited?
if ( girlsVisited[5] === true ) {
// Girl has been visited
}
else {
// Girl has NOT been visited
}
Code: Select all
// Initial script
girlsVisited = teaseStorage.getItem("girlsVisited") || {}; // Load last saved state, or start with empty list if no previous save
// Note the curly brackets instead of square brackets!!
Code: Select all
// Assuming Page 1 is girl A, when finished you do
girlsVisited["A"] = true; // You need to manually set and track the girl letter/name for each girl.
teaseStorage.setItem("girlsVisited", girlsVisited)
// Using a full name would just look like
girlsVisited["Amanda"] = true;
Code: Select all
// Has girl A been visited?
if ( girlsVisited.hasOwnProperty("A") and girlsVisited["A"] === true ) {
// Girl has been visited
}
else {
// Girl has NOT been visited
}
// Using a full name (uses up the available teaseStorage more quickly)
if ( girlsVisited.hasOwnProperty("Amanada") and girlsVisited["Amanada"] === true ) {
// Girl has been visited
}
else {
// Girl has NOT been visited
}
Code: Select all
// Initial script
function girlWasVisited(name) {
// Has girl name been visited?
if ( girlsVisited.hasOwnProperty(name) and girlsVisited[name] === true ) return true
return false
}
// And in your pages or wherever
if ( girlWasVisited("Amanada") ) {
// Girl has been visited
}
else {
// Girl has NOT been visited
}

Wew. ima try it out. thank you!PlayfulGuy wrote: Wed Mar 12, 2025 8:54 pm There are plenty of other ways, but in the interest of keeping it simple and understandable, this should work well enough.
Hope that helps!
PG
