Great job! Thanks. I just have one question. How can I script a textbutton that toggles the placement on and off?
wow nice tutorial!
thanks!
This is a great tutorial, but I’m wondering how would I make objects stack?
can you show the final scripts? because you made the saving but never implemented it.
I know a lot of people have mentioned this, but how do I make the items stack? What I’m trying to do here is to treat each item placed down as an individual canvas, so is there a way to do that?
How can I access the saved furniture?
Just to clear up any confusion on this old thread, you can implement “stacking” by just converting the Vector2s to Vector3s and adding Z positioning to :CalcCanvas(). Also, @Ex_Bla, you can access your saved furniture through a script and using the fromSerialization() function, or you can use a DataStore Editor like this one that I use, and read it from there.
Here is an example of stacking:
All3Axies.rbxl (32.3 KB)
(It is the game that EgoMoose attached except with implemented stacking)
@Bob4Koolest I believe this is what you wanted
How would one go about saving upon exit when using this specific system?
Edit: I understand that this is a very old post, (2 years old) but it’s helped me understand a lot.
I’m having trouble figuring out why the the equation is divided by 2, I understand almost everything else, but I’m having trouble with this one. If anyone could give me an answer it would be very appreciated!
Good question!
When we clamp the position of the object we’re placing we need to make sure that it doesn’t overflow off the edge of our placement surface.
To handle that we calculate a bounding box that contains all possible points that the object could be placed at without going over the edge.
- Red box: Object
- Black box: Surface
- Green box: Clamp bounds
Keep in mind an object is placed at it’s center so the gap between the black and green box should be equal to half the objects size on each respective axis.
Also note that this image was just quickly thrown together in paint so the exact size of the bounding box is not mathematically perfect like it would be in code.
Hope that helps a bit
Hello! This recourse has been incredibly helpful, even if it’s old, egomoose’s work stands the test of time!
I do have one question though. I’m currently adapting this into a chunk terrain painter for a project i’m working on, this small plugin is just meant to help me paint over a map i’ve drawn out for a kingdom builder project i’m making. This mostly works however I am having an issue thus far in my adaption:
Sometimes the grid shifts…
some times its even just .1 stud shift that makes it impossible to fill in empty spaces,
I don’t know if there is another resource to accomplish this grid terrain, but i am running into this problem and I don’t know why. I didn’t really change the placement code, just adapted it to run when the mouse moves and if the mouse button1 is down.
Any help in understanding how to fix this?
Hey! This tutorial is incredible, it’s helped me so much since this is something I hadn’t the faintest idea of how to do.
I only have one question, while using StreamingEnabled the plot fails to load. [as expected as it’s searching client-sided]
Would I be able to fix this by finding the plot on the client and waiting for it to be streamed in, then when the player claims a plot [because it has almost certainly been streamed in by then] clone the plot base on the client so that it won’t be streamed out as a client-created part?
Hello,
I’m writing this in regards to the multiple canvas placement system and the saving aspect of this:
I sent a message to EgoMoose a while ago but received no response so I was wondering if anyone has the solution to this.
I was wondering how one would go about loading and saving the furniture serialised onto the correct canvas.
There is an attempt at this in this thread:
But I can see no actual solution to this problem.
Thanks in advance!
This is truly awesome! But I was wondering, how would I make it so you can cancel/stop placing? Your cancel just deletes everything but I want to cancel the model I am placing, how do I do that?
Disconnect the RunService function.
how can i make a button, that when you click everything that construction system appears?
Disconnect and reconnect the RunService event.
Ummm so if im building a hotel game with multiple plot each in different team then when i save i rejoin on another server and i spawn on different team,Will the hotel i save spawn on other’s team plot?
Haha, this response is 3 years later, but I hope you can still help
I am a pretty beginner scripter and was wondering what you meant by “same stuff from before”
Thanks