#Procedural generation system bug
1 messages · Page 1 of 1 (latest)
I am trying to create a procedural dungeon generation system
Problem: Some connected tiles close off when they shouldn't
Code
Example of the problem:
My theory is that it calls branchout multiple times on the same space and it has something to do with the processedTiles and tilesToProcess tables.
Red means the waypoint/connecting part was closed off
even though as you can see in the image the tiles are connected
have you tried adding more nesting?
local NewTilePiece = AssetFolder:GetChildren()[math.random(1, #AssetFolder:GetChildren())]:Clone()
local CheckBox = Instance.new("Part")
CheckBox.Anchored = true
CheckBox.Size = NewTilePiece:FindFirstChild("Hitbox").Size - Vector3.new(2.5, 2.5, 2.5)
CheckBox.Parent = workspace.Debris
task.wait()
local partsInCheckBox = workspace:GetPartsInPart(CheckBox)
CheckBox:Destroy()
``` lol workspace:findpartsinbox
i think you're cooked
Region3 instead?
region3 is just another way of defining a box? it doesnt do anything on its own
What are you trying to say here?