Shattered wrote: ↑Sun Mar 10, 2019 3:49 pm
Roundhound wrote: ↑Sun Mar 10, 2019 7:01 am
Shattered wrote: ↑Sun Mar 10, 2019 2:01 am
I finally got time to test this out, not sure what code to get users name is but I just filled it in as a set for now. Seems to get stuck on 'loading modules' in testing...anyone used this successfully so far?
So I didn't realize how GUI involved making of an EOS tease was. I made a quick tease that should do it now. It basically just lets you loop through setting and resetting a name.
Inside is a bunch of json data. I can't attach a json file to this post. Copy the data inside into a file and save it as a <something>.json file. Then you should be able to upload it to EOS.
- Spoiler: show
-
I copied this into Eos and it said there was some sort of error and I couldn't import. I had a quick read through and couldnt see how its placed into storage as well...sorry
Yeah this needs to be imported through the restore process from your local computer. Ugh I can't even attach a text file to this.
Do these steps:
1. Create a file on your local computer called <something>.json
2. Open the file and copy paste the code into it and save the file.
3. Go to the EOS Editor and use the restore feature to upload the file you created in step one.
4. You should now have a tease called Save User Name in your list of teases.
If it still doesn't want to work then I'm not sure.
Basically all you need to do in your init step declare a userName variable and attempt to grab the username from storage.
Code: Select all
//Name is the key you saved the userName under.
var userName = teaseStorage.getItem("name");
If you only want to prompt for a username if it doesn't exist we need an IF action.
Inside of that IF action put this as the eval condition
This will make it so if userName is null or if it doesn't yet exist if will do the actions listed under the IF on the right hand side of the screen, not the middle.
For actions under the IF we add a Prompt action. For the variable name put userName;
We then need to add an EVAL step to run after that Prompt. This will be us saving the value to the teaseStorage.
Code: Select all
//"name" needs to be the same value as in the first code block.
teaseStore.setItem("name", userName);
This should now be reading and saving the username and only asking for it if it doesn't yet exist. If it still doesn't quite work we could try out a voice chat/screen share or something.