#help waffle with code

1 messages · Page 1 of 1 (latest)

swift jackal
#

hi

tardy nova
#

I love that thread name btw

#

Also hi

swift jackal
#

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

tardy nova
#

Quick question, is this like a randomly generated level

swift jackal
#

yep

tardy nova
#

Ah

swift jackal
#

so for a fix

tardy nova
#

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

swift jackal
tardy nova
#

I don't know what that's supposed to mean

swift jackal
#

this is my fix for the problem

tardy nova
#

Are you following any like tutorial or post or smth on how to make randomly generated levels?

swift jackal
#

I want the checker box to only count for sub checkers instead of counting all colliders in it

tardy nova
tardy nova
#

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

swift jackal
swift jackal
tardy nova
#

Or triggers

swift jackal
#

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

tardy nova
#

Could you like

#

Show some images from the game

#

To clarify it a bit more

swift jackal
#

sure

#

the problem dont happen very often tho

tardy nova
#

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 😅

swift jackal
#

yep, it's a confusing thing to try and explain

#

here is the map when it finish generating:)

tardy nova
#

That's pretty cool

#

So what's going wrong with this exactly?

swift jackal
#

for connected rooms the door is open

tardy nova
#

Yes

swift jackal
#

if door way dont connect, or doesnt lead to anything, it create a door

#

(glowy white door)

tardy nova
#

It doesn't connect anything?

#

There's no room there

swift jackal
#

yep, if there is no room behind door way, it's closed

#

the problem with this is

tardy nova
swift jackal
#

sometimes 2 rooms are wayyy to close to each other

tardy nova
#

Well you can code so it doesn't do that if you want

#

Or is that what you're trying to achieve

swift jackal
#

connected = no door, nothing behind/not connect = door

swift jackal
tardy nova
swift jackal
#

the door is a wall, can not be open

tardy nova
#

Why'd you use a door as a wall

swift jackal
#

can we join vc or smt?

tardy nova
#

Eh

#

No not really

#

Kinda at work

swift jackal
#

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

tardy nova
swift jackal
#

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

tardy nova
#

Okay so why doesn't it connect then again?

#

Because sometimes it does right?

swift jackal
#

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

tardy nova
#

Naming rule violation reee

tardy nova
#

I'm failing to understand why it sometimes doesn't work

swift jackal
#

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

tardy nova
#

you mean blue?

#

because it already checks for cyan

#

Are those blue ones just gameObjects?

#

(with a collider)

swift jackal
swift jackal
swift jackal
#

srr I was sleeping yesterday 😅

tardy nova
#

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

swift jackal
#

nope, it is still what it is:)

swift jackal
tardy nova
#

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

swift jackal
#

will wait when you get up:)

swift jackal
#

good night cool programmer guy:)

tardy nova
#

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 😅

swift jackal
#

no worries:) you don't have to help me if you can't:) thanks for being there anyways

tardy nova
#

Oh I can help you

#

Well, I can try is the thing kek

#

Also hi :D