Your first webtease? Let us help you out!

Post all technical issues and questions here. We'll gladly help you wherever we can.
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Your first webtease? Let us help you out!

Post by Jabber »

Darigaaz wrote: Mon Jun 14, 2021 10:34 am You can reset the storage with

Code: Select all

teaseStorage.clear()
I tried this, but it does not seem to clear the storage. And in the editor I am shown the warning "Property 'clear' does not exist on type 'TeaseStorage'.(2339)".
Darigaaz
Explorer
Explorer
Posts: 87
Joined: Wed Oct 07, 2020 11:12 pm
Gender: Male
Sexual Orientation: Straight

Re: Your first webtease? Let us help you out!

Post by Darigaaz »

I tested again on my tease, and it works fine. Did you enable teaseStorage in the options ? Did you already store something in the teaseStorage ?
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Your first webtease? Let us help you out!

Post by Jabber »

Darigaaz wrote: Mon Jun 14, 2021 3:28 pm I tested again on my tease, and it works fine. Did you enable teaseStorage in the options ? Did you already store something in the teaseStorage ?
Yes, I enabled the Storage module. I stored something before realizing I might have to reset storage for testing.

For now I have found an ugly workaround: I work with JavaScript variables, which I initialize (or not) from storage at startup. During the tease changes are stored both in the variables and in storage.

It would be so nice if I could see the source in a repository. Then I could understand it better, and maybe send pull requests if I think enhancements would be good. I checked the OpenEOS repository, and here it does not look like there is any way to clear the storage.
Darigaaz
Explorer
Explorer
Posts: 87
Joined: Wed Oct 07, 2020 11:12 pm
Gender: Male
Sexual Orientation: Straight

Re: Your first webtease? Let us help you out!

Post by Darigaaz »

Are you sure you put the parenthesizes after "clear" ?
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Your first webtease? Let us help you out!

Post by Jabber »

Darigaaz wrote: Mon Jun 14, 2021 10:27 pm Are you sure you put the parenthesizes after "clear" ?
Yes, exactly as you typed it, with the parenthesizes. The warning I see is puzzling me too, as I consider clear() a method of class TeaseStorage, and not a property.

I tried this both directly in an eval action on the start page, and in an initialization function in the init script. In both cases I saw the exact same warning in the editor (same as I would get when trying to call a TeaseStorage method that does not exist), and not the desired effect when running. In the browser console I see no output when the clear() method is called.

My Javascript knowledge is still somewhat limited, but I have been programming professionally for 30+ years and intimately know several dozen programming languages, so I do not think this is the problem.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Your first webtease? Let us help you out!

Post by fapnip »

Jabber wrote: Tue Jun 15, 2021 10:51 pmThe warning I see is puzzling me too, as I consider clear() a method of class TeaseStorage, and not a property.
The warnings in the Eos editor unfortunately can't be trusted. There's a bunch of stuff you can do in Eos evals that the editor will mark as an error, but will work just fine when you run the tease. There's also a bunch of stuff you can't do that the editor will think is fine.
Legacy1221
Curious Newbie
Curious Newbie
Posts: 4
Joined: Tue Jun 15, 2021 7:24 pm

Re: Your first webtease? Let us help you out!

Post by Legacy1221 »

How do I make a tease that has timers and options for people to click on????? Please Help
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Your first webtease? Let us help you out!

Post by fapnip »

Legacy1221 wrote: Tue Jun 22, 2021 2:19 am How do I make a tease that has timers and options for people to click on????? Please Help
Kind of a broad question, but for some tutorials on how to use the Eos editor see:
viewtopic.php?f=2&t=22570
Legacy1221
Curious Newbie
Curious Newbie
Posts: 4
Joined: Tue Jun 15, 2021 7:24 pm

Re: Your first webtease? Let us help you out!

Post by Legacy1221 »

fapnip wrote: Tue Jun 22, 2021 1:59 pm
Legacy1221 wrote: Tue Jun 22, 2021 2:19 am How do I make a tease that has timers and options for people to click on????? Please Help
Kind of a broad question, but for some tutorials on how to use the Eos editor see:
viewtopic.php?f=2&t=22570
you sir are a legend. Thank you!!! Im bout to make epic foot teases
User avatar
achelappian
Explorer
Explorer
Posts: 5
Joined: Sat Jun 19, 2021 11:32 pm

Re: Your first webtease? Let us help you out!

Post by achelappian »

Hi! Totally new here, not at all familiar with coding or javascript or EOS so I could use some help.

Can someone point me to more in-depth documentation for EOS?

Browsing the forum I'll see knowledgeable people saying something like:

Code: Select all

Notification.get('my-notification-id').setTitle('Hello world.')
So now I know that the Notification object has a method called SetTitle. Where would I go to find all of the properties of the built-in EOS objects on my own?

Also, where can and can't I put <eval> blocks? For places where I clearly can't, like the identifier for a notification, is there some sort of workaround I could use to build a notification dynamically?
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Your first webtease? Let us help you out!

Post by fapnip »

achelappian wrote: Wed Jun 23, 2021 7:02 amWhere would I go to find all of the properties of the built-in EOS objects on my own?
See:
https://milovana.com/eos/editor/help/api-reference
achelappian wrote: Wed Jun 23, 2021 7:02 amis there some sort of workaround I could use to build a notification dynamically?
Use a variable to track if your notification has been created or not (set it true when it opens, false when it's closed), then wrap the display of that notification in an IF action.

(After a notification has been displayed and removed, Notification.get('my-notification-id') still seems to returns a valid object, so you can't reliably use if (!Notification.get('my-notification-id')) {...} as a way of checking if the notification is displayed or not.)
User avatar
achelappian
Explorer
Explorer
Posts: 5
Joined: Sat Jun 19, 2021 11:32 pm

Re: Your first webtease? Let us help you out!

Post by achelappian »

Thanks! I was scouring the forums like a dummy.
fapnip wrote: Wed Jun 23, 2021 3:44 pm Use a variable to track if your notification has been created or not (set it true when it opens, false when it's closed), then wrap the display of that notification in an IF action.

(After a notification has been displayed and removed, Notification.get('my-notification-id') still seems to returns a valid object, so you can't reliably use if (!Notification.get('my-notification-id')) {...} as a way of checking if the notification is displayed or not.)
I may be going about this the wrong way. I'm trying to use notifications to help the user track some things about the game state without having to jump to another page. I can sort of get what I want concatenating some words and setting them as the notification title, but it would be very useful have line breaks in there to display the words as a ranked list. Can I do this or will the titles just not take any javascript?
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Your first webtease? Let us help you out!

Post by fapnip »

achelappian wrote: Thu Jun 24, 2021 12:16 am it would be very useful have line breaks in there to display the words as a ranked list.
Unfortunately, there's no reliable way to do this in a single notification. (No way currently to embed HTML in the notification.)

You can, however, display multiple notifications. Just create them with different IDs, and you'll be able to set the title on them independently. You can also embed emoji characters that can sometimes help with display in the limited space.
Legacy1221
Curious Newbie
Curious Newbie
Posts: 4
Joined: Tue Jun 15, 2021 7:24 pm

Re: Your first webtease? Let us help you out!

Post by Legacy1221 »

OK so... I figured out how to make the tease with timers and options... But for the life of me I cant figure out how to add audio sound to the tease... I have 3 audio files uploaded and ready to go in the audio section but when I click one it just check marks it and gives no options... PLEASE HEEELLPPPP
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Your first webtease? Let us help you out!

Post by fapnip »

Legacy1221 wrote: Thu Jun 24, 2021 2:36 amI cant figure out how to add audio sound to the tease...
First, you need to go into the tease options (gear icon on the left in the editor) and enable the Audio module.

Next, you add an Audio.play action in the page you want to play the audio file on. Then inside that audio play action, you select one of the mp3 files you've uploaded.
Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 60 guests