Currently having issues with procedural generation

If I were you I’d get to the root of the issue. I wouldn’t leaf it alone. Just gotta tree again.

You are correct, I do sort of need this done soon, but if you’re going to help it’d be better if we moved to messages instead since messages are more confidential than public topics. (Obviously)

As I keep kinda hinting at throughout this entire thread, I don’t want to leak any of my server stuff.

1 Like

While this is way above my script knowledge, a couple of things come to mind which may help you do this. Firstly, when you create the maze, I’m assuming you’re using objects from some kind of storage. Perhaps make an alternate model that has arrows or hints that you can randomly place using some kind of random number generator when it’s being formed.

The other idea which I feel is way more complicated is once the maze is done (and before the player has control of their character) use the pathfinding service to create a path (similar to an NPC find its way) from the start to the finish and count the number of path points into an array. Then find the position of that point and the cframe of whatever it’s spawned on and replace that part of the model with a new model containing the hints.

I do apologize if I completely missed the point.

For anyone who needs to do something like this, what I did is I made a table which spawns 2 entry tables and passes them to a function.

In that function, it generates the hallways and puts the hallway assets under this entry table. Once the script reaches a T-Junction, it creates a new entry table under the first entry table and passes that to the same function, effectively creating a loop and DataTree you can iterate through to get the path to the exit.

To avoid it going to dead ends, you can have the iterate function to get the path to the end check if a hallway its iterating through abruptly ends without reaching the exit designation.

You can redo this every time you reach an entry table.

(P.S. Thank you Exercitus for the inspiration for this method with his N-ary module.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.