#Room generation and sectioning help
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **
You here?
Okay so can u explain your post better
Ye
Okay, you know like those room subsections, (like the big industrial sections or the water ones)
** You are now Level 2! **
Im trying to make something like that
But my game is different in a way that uhh
Give me a second I just woke up
So you want to procedurally generate them or what
I've done that already
So what's the problem
This
There is the subway section and industrial section (which i have yet to work on), there needs to be a transition at a specific point
Oh I see.
Yeah, bear with me, I can barely script as is
So how have u been generating this section? Module scripts?
Yes!
That's very good
So is it like I describe. U just call some function using some Events that generate further eay
Way
Hmm
At a certain door I call a function that stops subway rooms and generates industrial?
Okay
Uhm lemme get my stuff
Ok
Not ideally. U should keep track of how many subsections of room have u generated use that to transition to some other themed generations
okay
I mean yeah that's the same thing ig
U can share the code here ig
Unless it's a mountain
its like 77 lines so not much
dammit my msg is too long
i know how to use lua formatting
i have to split my stuff bc of my lack or nitro
one second
holy
uhh
ill just send a screenshot
Btw. You can also create a theme manager. It'd keep track of the current theme and the room generation system would refer to it for determining what theme to generate. With a controller script u can change the theme midgame. That's a good approach ig
It's easy rly
Idk how ur room generation work so I cannot tell u how
But it's rly intuitive
** You are now Level 3! **
i have the room info script if you want that too?
No
okay
Create a theme manager module with two functions, get current theme and set theme
under the room module script?
Doesn't matter. Require that in this generation script and fetch the current theme and generate accordingly
okay
Keep the room models under a folder named the appropriate theme
You'd need to rewrite your get random room function. Find a generalized way to get a random room
That'd work for all themes
Or wait a sec
I'm not sure how info module work so u gotta determine that
points
(i dont need you to write it for me i just get a bit confused)
Just create a common function for all themes
Oh mb
So u need like steps laid down
?
oh boy
-
Make a Module Script called ThemeManager in ReplicatedStorage.
-
Inside it, store a currentTheme variable and a list of themes.
-
Add functions to get the current theme and set a new theme.
-
Make a Script in ServerScriptService to cycle through the themes over time (use a wait/timer).
-
In your room generator, check the current theme from ThemeManager before spawning a room.
-
Spawn rooms based on the theme (e.g., Industrial, Water, Lava).
-
When the timer ends, ThemeManager changes the theme, and new rooms follow the new themes.
So get to work. I'm here if u get stuck at a step
U got this 💯
thanks zawg🔥
wait wait
timer?
i dont need it based on a timer
i need it based on the halfway point (room 50)
okay
You can keep track of how many rooms you've generated in the room generation module. then use it in the controller script to switch to a diff theme
Note that the controller script will only change themes. Generations can be handled in a separate thread or script
ohh i see
in fact should be*
bro. thats wrong