I figured out how to get text to resemble what you are typing in the textbox, but I am wondering how to save the value that you typed. Here is the .wick file: My Project6-3-2024_10-44-33.wick (3.5 KB)
I recommend looking into the localstorage method for this.
You may find this useful:
extra useless note
Note that the window’s local storage provides you with 5 MB of storage, which is a pretty good amount, unless if you want to make a super complicated game that requires a buncha packs and downloads, in which case you may want to research indexed data bases, which are not as simple to use as local storage. Though it’s unlikely you’ll ever need em, I’ve only needed to use them once in my life. It’s still good to know that another option exists out there.
There’s also cookies
I’ve made a variation of your project with the local storage save, so that whatever you type inside of the box is saved automatically.
Summary of what I did:
- Named the box clip inside of the textbox “box” (didn’t have a name before)
- Inside of the box clip inside textbox, load script, lines 27 to 28 check if there’s saved data in the storage, and if there is, the textbox will get set to that when it first gets created.
if(window.localStorage.getItem("name"))
this.inputElem.value=window.localStorage.getItem("name");
- Inside of the textbox from the main project, I added an update script that keeps on updating the saved stored data to that of what’s written inside of the textbox.
window.localStorage.setItem("name",this.box.inputElem.value);
Here’s the file: My Project6-13-2024_15-21-51.wick (3.5 KB)
I hope this helps. I definitely recommend also looking into the changes I made and the w3schools local storage tutorial link I send, this storage stuff are very useful in games!
use a variable or either make a function.pressed() command for when it’s pressed to take that variable :p