Jump to content
The Dark Mod Forums

paths and rooms


joebarnin
 Share

Recommended Posts

Hello all. I'm seeing a weird problem with a guard's path - could be I'm doing something wrong. Here is the simplest case I could come up with. Large room (A), with a guard walking a circuit around it (path_corners only). There is a room (B) off of the large room, with a door between them. If the thief (player) is in the large room, the guard does his rounds just fine. If the thief is in room B with the door open, the guard walks the path just fine. But as soon as the thief closes the door (from within room B), the guard stops at the next path_corner. He doesn't start walking again until the thief opens the door again.

 

Has anyone seen this?

 

Jeff

Link to comment
Share on other sites

To rule out one possibility, check to see if the visPortal on the door is okay (e.g., no weird textures on one side, anything that isn't nodraw or visportal, that it's aligned okay, etc.), since that will screw with pathfinding -- an AI will not path through a bad visPortal -- and might explain why it's the closing of the door that's making the difference (since that activates the visPortal).

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

To rule out one possibility, check to see if the visPortal on the door is okay (e.g., no weird textures on one side, anything that isn't nodraw or visportal, that it's aligned okay, etc.), since that will screw with pathfinding -- an AI will not path through a bad visPortal -- and might explain why it's the closing of the door that's making the difference (since that activates the visPortal).

 

That's it. I deleted the visPortal and now the path is working correctly. So now I just need to re-read the visportal wikis and figure out what I did wrong. I'll update this topic once I do. Thanks!

Link to comment
Share on other sites

If you did what I did to get this bug, you accidentally put a texture on one thin side of the visportal brush; all 5 of the other non-portal faces should be nodraw.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Easy to accidentaly slap a tex on one face too, I've made them right and had them turn out bad. At least it's easy to find and fix.

 

Just make the brush to fill the gap, right-click, 'make visportal'. Textured correctly for you.

 

Problem solved. I had carefully inspected the brush, and it was just the way it should be (1 visportal face (matching the door), 5 nodraws). Still didn't work. But when I did the "make visportal" trick on that same brush, that fixed it.

 

I'll use "make visportal" from now on. Thanks, everyone!

 

Jeff

Link to comment
Share on other sites

I spoke too soon - it's still broken. The reason I thought it was fixed is that the "make visportal" command put the visportal surface outside of the door and the door opening. So it was as if there was no visportal on that door. If there's no visportal, then the problem doesn't happen. When I moved the visportal to the correct location, the problem happened again.

 

Note that the visportal is working correctly, at least as a visportal. "r_showPortals 1" shows red when the door is closed, green when it is open. The only problem seems to be with pathfinding when the door is closed.

 

Is there something I should look for in the dmap console output? Can a visportal function properly as a visportal, but mess up pathfinding?

 

Jeff

Link to comment
Share on other sites

Visportals don't (shouldn't) mess with pathfinding (other than breaking up one AAS area into two joint AAS areas.)

 

The only thing that comes to mind is that there is something wrong with the door itself. Maybe its locked. Maybe its origin is below the floor. Maybe its got the spawnarg shouldBeClosed or ai_should_not_handle set on it.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

Bad visportals do break pathfinding. I found out myself the hard way -- 1, 2.

And he already said when he deletes the visportal, all things else equal, the pathing works.

But it's true he doesn't have the same visportal problem I had (a mistexture), so I don't know off-hand what else might be wrong with it.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • jaxa

      Embracer Group is Buying Square Enix Montréal, Eidos, and Crystal Dynamics for “Only” 300 Million USD: https://wccftech.com/embracer-group-square-enix-montreal-eidos-crystal-dynamics/
      · 1 reply
    • duzenko

      Do we want fur in TDM? Like https://duzenko.github.io/webgl/
      · 6 replies
    • Epifire

      Sometimes life throws a curveball - other times it straight up tries to take you outta the game. Been one thing after another lately but I ain't goin without a fight!
      · 2 replies
    • duzenko

      My Uber rating (as a passenger) is 4.71. Is there still hope or should I just kill myself? What's yours?
      · 3 replies
    • kano

      Did I mention how absolutely grateful I am that TDM didn't get (and can never be) assimilated by a huge company like Microsoft, as is what happened to Minecraft?
      · 3 replies
×
×
  • Create New...