Dictionary load and save tutorials
-
Thanks guys..
-
Oh oops, yeah I found out about the issue with the demo I made. One of the behaviors were using the wrong input for when deleting a key. 🙃
So in the project, when pressing save, it will save the current contents of the dictionary to file. If there is already a save, it will be overwritten.
After you quit and come back, you can press load to restore that. It will load the contents back into the dictionary and it will update the label to display the contents.
-
But yeah, about the tutorials, I am disappointed with how we currently do things and the lack of tutorials we have. We do have a dedicated Help page with all the documentation, links to video tutorials, etc. but either the content doesn't help (too broad/no examples) or nobody refers to them.
It also doesn't help that most of it is outdated 🙃 They're reliable but the screenshots would show UI that is different than what we have now
We are currently focusing on web support, but I also think we should also focus on making the app itself more beginner friendly with built-in interactive examples and explanations. If the stuff that we have isn't clicking, then we should probably focus on more concrete foundational examples like this one:
-
We could really use a clear tutorial on arrays and dictionaries — something that shows how to add and remove elements with simple, clean examples, and explains how an inventory system should work.
This would be perfect. ❤️
-
How do I put an object at the next index value place?
It’s not append and not prepend. And I am not supposed to know the current index.After the A9. How can I put my next object there? Is there any function to put things one after the other?

-
How to delete a spawned object from the array?
I pick up an object and that object appears in the inventory. I want to remove the object from the inventory and from the array at the same time. Destroying the inventory object itself is easy, but I don’t know how to remove the source object (the one that was used to spawn the inventory object) from the array.
The problem is that the object I pick up and the object in the inventory do not share the same object ID. Every time I pick something up, the inventory gets a new object instance with a new ID.
How can I delete the original source object (the one that was used to spawn the inventory object) from the array when I destroy the inventory object? -
Here I found it

-
How do I put an object at the next index value place?
It’s not append and not prepend. And I am not supposed to know the current index.After the A9. How can I put my next object there? Is there any function to put things one after the other?

How do I put an object at the next index value place?
It’s not append and not prepend. And I am not supposed to know the current index.After the A9. How can I put my next object there? Is there any function to put things one after the other?

You must find the index of the first occurrence of "".
Loop loop through all elements of an array --> If check whether the current value is equal to "" --> Modify Array if the current value is equal to "", then you can replace the item given the current
indexof the Loop behavior -->Break you want to break out of the loop so it doesn't do it for the rest of the array.

-
How to delete a spawned object from the array?
I pick up an object and that object appears in the inventory. I want to remove the object from the inventory and from the array at the same time. Destroying the inventory object itself is easy, but I don’t know how to remove the source object (the one that was used to spawn the inventory object) from the array.
The problem is that the object I pick up and the object in the inventory do not share the same object ID. Every time I pick something up, the inventory gets a new object instance with a new ID.
How can I delete the original source object (the one that was used to spawn the inventory object) from the array when I destroy the inventory object?How to delete a spawned object from the array?
I pick up an object and that object appears in the inventory. I want to remove the object from the inventory and from the array at the same time. Destroying the inventory object itself is easy, but I don’t know how to remove the source object (the one that was used to spawn the inventory object) from the array.
The problem is that the object I pick up and the object in the inventory do not share the same object ID. Every time I pick something up, the inventory gets a new object instance with a new ID.
How can I delete the original source object (the one that was used to spawn the inventory object) from the array when I destroy the inventory object?For this one you want to store the source object ID in the spawned object using attributes. You can use Set Attribute to set a key with the object ID as the value. Then when destroying the object, you can use Get Attribute to retrieve it from the object.
Here's an example:
Original Object
The original object spawns another object (the red one). In the spawned object, we can set an attribute
source object idwith the original object id.
Spawned Object
The spawned object can retrieve the original object that spawned it and destroy it.

-
Thanks 😃
-
Yes but it is coming from a loop and a spawn the entire array. So what would you do?
-
A little option to destroy the source would be nice 😊
-
It’s weird because sometimes it delete the source even if the ID is not the same… For that I do a modify array by doing a get array value at index when the spawn object is touched. But it doesn’t work every time. I don’t understand why.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login