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 wrote: ↑Mon Jun 14, 2021 10:34 am You can reset the storage with
Code: Select all
teaseStorage.clear()
Your first webtease? Let us help you out!
Re: Your first webtease? Let us help you out!
-
- 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!
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 ?
Re: Your first webtease? Let us help you out!
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.
-
- 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!
Are you sure you put the parenthesizes after "clear" ?
Re: Your first webtease? Let us help you out!
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.
Re: Your first webtease? Let us help you out!
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.
-
- Curious Newbie
- Posts: 4
- Joined: Tue Jun 15, 2021 7:24 pm
Re: Your first webtease? Let us help you out!
How do I make a tease that has timers and options for people to click on????? Please Help
Re: Your first webtease? Let us help you out!
Kind of a broad question, but for some tutorials on how to use the Eos editor see: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
viewtopic.php?f=2&t=22570
-
- Curious Newbie
- Posts: 4
- Joined: Tue Jun 15, 2021 7:24 pm
Re: Your first webtease? Let us help you out!
you sir are a legend. Thank you!!! Im bout to make epic foot teasesfapnip wrote: ↑Tue Jun 22, 2021 1:59 pmKind of a broad question, but for some tutorials on how to use the Eos editor see: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
viewtopic.php?f=2&t=22570
- achelappian
- Explorer
- Posts: 5
- Joined: Sat Jun 19, 2021 11:32 pm
Re: Your first webtease? Let us help you out!
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:
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?
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.')
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?
Re: Your first webtease? Let us help you out!
See: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?
https://milovana.com/eos/editor/help/api-reference
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.achelappian wrote: ↑Wed Jun 23, 2021 7:02 amis there some sort of workaround I could use to build a notification dynamically?
(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.)
- achelappian
- Explorer
- Posts: 5
- Joined: Sat Jun 19, 2021 11:32 pm
Re: Your first webtease? Let us help you out!
Thanks! I was scouring the forums like a dummy.
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 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.)
Re: Your first webtease? Let us help you out!
Unfortunately, there's no reliable way to do this in a single notification. (No way currently to embed HTML in the notification.)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.
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.
-
- Curious Newbie
- Posts: 4
- Joined: Tue Jun 15, 2021 7:24 pm
Re: Your first webtease? Let us help you out!
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
Re: Your first webtease? Let us help you out!
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.
Who is online
Users browsing this forum: Amazon [Bot], Baidu [Spider] and 61 guests