#Any help with this?

1 messages · Page 1 of 1 (latest)

mellow kite
#

I'm trying to make it so my AI can open doors
The AI can't walk past the doors to go to the waypoints because it detects that the door is in the way, but I don't want it to be like that.
The AI can't even open doors to get to the waypoints.

final merlin
mellow kite
#

oh nvm found a way

final merlin
#

oh

#

sorry

#

I was on my spanish browser XD

mellow kite
#

dw about it xd

final merlin
#

you can also implement internal functions checking the distance to the doors to play animations,like to open them

mellow kite
#

But the problem is I don't know if thats gonna fix the pathfinding not going through the doors
cuz right now i have a waypoint behind a door and he just isn't making any attempt to go to that waypoint

final merlin
#

it should because it won't see it as a wall

#

like for the clients it is solid but for the npc it is air

#

my bad Ig,I was reading again documentation and the part must have cancollide = false

#

but maybe u can set the door or a door entry target , like if it can't go trough because there is a door, it will look for the closest targetDoor to the npc and to the humanoid, if the path success then you can go to that waypoint and use Humanoid:MoveTo() which ignores obstacles, you can implement collision groups or make the door open before he tries to walk trough

spare heartBOT
#

studio** You are now Level 2! **studio

mellow kite
#

Hang on I just thought
Would it work if I make it so the players can only collide with the doors but the ai cant?

final merlin
#

yeah, the doors won't collide for the server so ur AI just will detect them as a way to go though but u may have to use remotes to show every player the door opened and it may be easier to exploit them, maybe you should have some server sided checks, also, they will have lag unless you just make the open/close visible for a single player

mellow kite