#help waffle with code
1 messages · Page 1 of 1 (latest)
the code is suppose to check if there are 2 rooms is connected to each other
if it detect 1 or less collider it close the room off
but!
this happen
the room isnt connected
but the room is still there
Quick question, is this like a randomly generated level
yep
Ah
so for a fix
So you're just trying to check if a room is adjasoned to another
If so, make a hole in said room in order to connect them
From what I'm understanding
I don't know what that's supposed to mean
Are you following any like tutorial or post or smth on how to make randomly generated levels?
I want the checker box to only count for sub checkers instead of counting all colliders in it
nope
Are each of these colliders just a generate empty gameobject or?
Might be good to Google on how to do these types of things
I can try to help with your solution that you've right now, but it might be a bit of an XY problem, not sure though
the sub checker are set on each doorway of the room
which colliders?
nah, the green are the overlapping boxes to check for colliders
the cyan ones are trigger which I want the green one to check
the blue is the room, which contain the collider that I dont want the green to check
So it does already create doors?
There's just a bug that it sometimes does not or smth?
Sorry it's hard to keep track of everything you're trying to tell me 😅
yep, it's a confusing thing to try and explain
here is the map when it finish generating:)
for connected rooms the door is open
Yes
if door way dont connect, or doesnt lead to anything, it create a door
(glowy white door)
Oh wait so this goes out of bounds
It doesn't connect anything?
There's no room there
If there's no room behind a door there shouldn't be a door right?
sometimes 2 rooms are wayyy to close to each other
Well you can code so it doesn't do that if you want
Or is that what you're trying to achieve
connected = no door, nothing behind/not connect = door
that's what im trying to achieve
Wait so it does exactly the opposite of what you want?
the door is a wall, can not be open
Why'd you use a door as a wall
can we join vc or smt?
alr, no worries
replace the word door with wall then
Im trying to make the map closed
if the rooms are connected, there is no wall between them
Wait do you just only have walldoors because you don't want to generate normal walls or smth?
if they are behind the doorway, there is nothing or an unconnected rooms, then a wall is put there
how it do this is to add a checker at the doorway to see if 2 or more collider is there and that will be qualified as a connected
but sometimes unconnected rooms are right next to each other but isnt connected
and checker think that they are connected cause 2 collider is there
sometimes rooms are close to each other
so it dont spawn the wall
(I set the check radius to be bigger here so it will be recreate more often)
it touching 2 things
so it counts as connected
decreasing the check size works too
but sometimes
in rare cases
rooms are like right next to each other
that just wouldnt work
so a fix would be it should check for door ways
instead of just for colliders
Naming rule violation reee
But why wouldn't it work
I'm failing to understand why it sometimes doesn't work
sometimes rooms are too close to each other
to boil this all down in a nut shell
this is not I want
doesnt check for blue
only for cyan
that's my problem
I want green to check for cyan and nothing else but cyan
you mean blue?
because it already checks for cyan
Are those blue ones just gameObjects?
(with a collider)
blue is the room (unwanted collider)
cyan are trigger boxes that I want the checker to specifically target
yep
srr I was sleeping yesterday 😅
Okay
So I think you indeed just want the tags
Did you make any progres with it @swift jackal or did you just put it aside
nope, it is still what it is:)
yep!
So you should be able to kinda use the thing I said, but it’s a bit hard to give a proper example because I’m not exactly sure on how your code works
How the colliders are saved/found etc
Also won’t be able to help rn, I’m going to go to sleep kek
will wait when you get up:)
good night cool programmer guy:)
Thanks!
Sorry I was busy & stuff
At work now so I've time to help till like 17:00
(9:21 now)
Sorry that I'm being so unhelpful 😅
no worries:) you don't have to help me if you can't:) thanks for being there anyways