How can I give sprites properties? #2023
-
Hey! I'm trying to make a more flexible text-to-speech extension and I want the current voice options to be a property stored in the sprite, similar to the position, rotation, volume, etc. How can I accomplish this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can create an object that stores other objects using the spriteID as the key, then serialize/deserialize it. also make sure to delete the ids when the sprites are deleted. |
Beta Was this translation helpful? Give feedback.
-
If you don't need it to save when the project is saved and loaded again:
If you need it to save when the project is saved and loaded again:
|
Beta Was this translation helpful? Give feedback.
If you don't need it to save when the project is saved and loaded again:
target.whatever = bwah;
and it will probably be okayconst whatever = Symbol();
then use astarget[whatever] = bwah;
If you need it to save when the project is saved and loaded again:
target.extensionStorage.yourExtensionID.whatever = bwah;
and this will be saved for you