I can figure out the building system really easily, i am just wondering how you would be able to add editing structures as in Fortnite, like how it would store or read the patterns and change the builds to suit it.
Would it be like a crafting system redesigned or…?
It is very complex…
You could make that the walls are made by 9 small squares, and when you are in edit mode you activate/deactivate them.
The correct way of doing it will be to make a class with a 2d bool array and a model, then you will have a container of all possible combinations, and when editing you will check if the current layout is equal to one in the array of a class in the array of classes
Thank you for responding! I am confused as to how to make the combinations recognized. I have an idea of using 0s and 1s for values, 0 if not selected, 1 if selected, but I am looking for a way to string all the values of all the gameobjects together into a string of values to be more easily processed and stored.
For example, 0, 0, 0, 0, 1, 0, 0, 0, 0, would be an edit window
I think I understand a bit, but could you elaborate?
And also 2d bool arrays? I’ll check it out. Thanks r31o!
(Just searched up 2d bool arrays)! This would help a lot! Thanks! How would I put all the values into it? Make it public and apply gameobjects to the value, right? I’m hoping this would work.
Thanks again r31o
Its r31o!!!
Something like that. Each combination will have a corresponding gameObject
agh sorry, I was typing in a rush.
How would I save the combinations to the script?
(edit) I’ll try this first and ask later.
Thanks for the quick reply
r31o
You could use scriptable objects, containing the 2D bool array and the corresponding piece. Note that you cant edit 2D arrays in the inspector (That sucks), so you will have to “hack” them a bit with an array of classes that contains a array of bools (Or use a standard array, like you said
Use the method you find most intuitive.
Doesnt matter
In fact, my name is a typing error
Ok! Thanks for the help and such quick replies! Hope I get it to work.