Re: Bots, Hostages, Doors and Navigation Mesh
Posted by uberDingo on
Mon Jan 24th 2005 at 4:21pm
72 posts
17 snarkmarks
Registered:
Dec 21st 2004
I've worked on a CS:S map in the past that utilize hostages. Now since the release of the CS bots I've been goofing with bots a lot and trying to make sure the map I'm working on can be played by 1 person and a mess of bots as well. One thing bots and hostages have in common is that they hate doors. They really dont like to go through doors and if you leave a bot in a room with a closed door he'll never leave. In the past I figured out a lil trick where you can compile the map without the doors, build the navigation mesh (nav_generate at the console while ingame) and then add the doors back into the map and play it using the navigation mesh you built before you put the doors back in. If you do this the bots and hostages navigate doors perfectly but I don't think it's the proper way to do it. Also, since they've added the bots you get a message that the navigation mesh you are using is made for a different build of the map you're playing. While the bots will still navigate the doors properly the error message is annoying and indicates to me that it's not the correct way to do it.
From this information I can only come up with these conclusions and more questions.
It's possible that bots and hostages where never intended to be used with doors. Are there any CS:S maps out there with hostages and doors? Have any of you played any CS maps with bots and doors? Did you get a message that said you where using the wrong navigation mesh?
If you want to mess around with this as well it's easy enough to test... create two rooms, but a door inbetween them and put two of one teams spawn point in one room and two of another teams in the other room. Now load up your map and play it with 3 bots... 1 on your team and two on the other team. The bots will just loiter around the rooms they start in (AARRRRGGGH!)
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by Livett on
Mon Jan 24th 2005 at 4:36pm
164 posts
46 snarkmarks
Registered:
Dec 24th 2004
Occupation: Student
Location: England
Please delete, I click reply once and it took a REALLY long time. Then crashed... I closed and reopened internet explorer and posted like 4 times >_<
Sorry
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by Rof on
Mon Jan 24th 2005 at 4:59pm
Rof
member
210 posts
41 snarkmarks
Registered:
Dec 3rd 2004
Has anyone tried using the logic_navigation entity? It looks like it
could be targeted to a door or other entity, and set so the hostage
would try to walk through it. Add a trigger_mulitple (or two) that
opens the door when touched, and it might work ok.
Or perhaps there's something you can do with info_node_hint, but I
tried decompiling cs_office to see what it does with its sliding door,
but it seems to have no info_nodes at all. Very strange.
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by Livett on
Mon Jan 24th 2005 at 5:03pm
164 posts
46 snarkmarks
Registered:
Dec 24th 2004
Occupation: Student
Location: England
If I send you my map can you try and get hosties to navigate through doors and drop into sewers?
I have info_noded the place so they will follow you anywhere which is not near a door.
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by uberDingo on
Mon Jan 24th 2005 at 6:00pm
72 posts
17 snarkmarks
Registered:
Dec 21st 2004
Alright, I've done some more experimentation and have come up with some more clues... not answers yet :wink:
If you load yer map up and go to the console type 'sv_cheats 1' and then 'nav_edit 1'
That will show you your navigation mesh. I've found that if I have doors and run 'nav_generate' then it will start in a room where I have a terrorist (in CS) spawn point and then work it's way out from there. It treats doors like walls and refuses to make the mesh for anything past the door, so that definatively explains why bots and hostages won't go through doors. Here's where it gets a bit silly... If I open my door and then run nav_generate again (while the door is still open!) it will create the navigation mesh through the door! (but I doubt past any other closed door.. but I didn't test that)
Also, the navigation mesh starts from a terror spawn point every time! I moved my terror spawn point from one room to the other and whichever room I put my terror spawn point in, that's where it would start the mesh. Then to make sure that it wasn't basing it on which spawn point I put in first (by some entity number?) I turned my counter-terror spawn into a terror and my terror spawn into a counter-terror spawn. The navigation mesh now generates starting in the other room where the terrorist spawn point is.
One way I could see to get around this problem is to put a secret button in your level somewhere that opened all doors at the same time, run nav_generate and then let the doors close... That seems like it would do the trick, but that just seems like a really back-asswards way to do it. Another problem Ive found with bots navigating doors is that if they come up to a func_rotating_door that's set to 'one-way' that opens towards them... they cant ever figure out they need to open the door and back up a bit to let it open hehe... this is even if you've done the remove doors, create mesh and re-add the doors method.
Well, there's some more clues for you... go play with the "nav_edit 1" and see what you think. Hell, if you wanted you could create the entire navigation mesh by hand using the navigation tools but that would be a true nightmare.
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by Livett on
Mon Jan 24th 2005 at 6:18pm
164 posts
46 snarkmarks
Registered:
Dec 24th 2004
Occupation: Student
Location: England
I might try that, I could put like an invisible block of trigger in the top corner of my map, surrounded by clip texture to open all doors, then i could just noclip up there, hit the trigger then nav_generate
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by uberDingo on
Mon Jan 24th 2005 at 8:34pm
72 posts
17 snarkmarks
Registered:
Dec 21st 2004
Woot! I think I got it figured out! Ok Livett, try this...
Compile and load up your map with all the doors in place. Go to the console and type 'sv_cheats 1' and then 'nav_edit 1'
This should bring up your navigation editor. It will change you pointer and if there's navigation mesh in the room you're in it will display it. Run 'nav_generate' from the console and check out which parts of your map the generator created mesh for (you'll be able to see it overlayed on the map if you have 'nav_edit 1' on).
Now go to all the rooms that don't have mesh because they are blocked by doors from the point the nav_generator starts creating the mesh from. In all these area's go to the console and type 'nav_mark_walkable', you only need 1 per area sealed in by doors. Once you've created all your nav_mark_walkables go to the console and type 'nav_generate' again. It will now create mesh in all the rooms where you formerly had no navigation mesh! (WOO HOO!) Now all you have to do is go to the doors where your hostages/bots would go through and again go to your console ... select one of the mesh boxs on one side of the door and type 'nav_mark' then put your pointer over the mesh box on the other side of the door and type 'nav_connect' Now select the one you just connected and type 'nav_mark' and then 'nav_connect' it to the original mesh box... Nav_connect is a one-way connection so you have to make the connection from each box to the other.
Bingo!
Tell me if these doesn't make sense (or if you find out anything else interesting on this subject!)
Re: Bots, Hostages, Doors and Navigation Mesh
Posted by Madpants on
Sun Mar 20th 2005 at 9:13pm
2 posts
0 snarkmarks
Registered:
Mar 20th 2005
Occupation: Web Designer
Ok, I ran into some of my own problems:
Using the methods that uber listed above, I managed to make my stairs walkable for the bots (THANK YOU UBER!!). The downside was that "nav_generate" did some funny stuff on it's own that I had to manually change and save using "nav_save". By the by, you can also use "nav_analyse" to generate sniping, crouching, and other spots on the fly without resampling your walkable space. Anyway, I had to use "nav_crouch 0" to remove crouch from the areas that "nav_generate" made. It was simple but time consuming as you have to target each area and enter the command into the console. (I like the ding it makes to let you know you did something right. :razz: )
Another small problem I had was that "nav_generate" doesn't always make the best analysis of where appropriate "spots" should be, like sniping spots. The upstairs that was previously ignored (thanks to my stairs) is now meshed... but the windows looking down upon the main area of conflict (and the secondary row in the back) are completely void of sniping spots. In fact, even though each room upstairs now has an auto-generated mesh, the bots seem to deem them useless areas of their own accord and avoid them entirely.
What I'd like to do is find some way to give them the incentive to go in those rooms and snipe. Unfortunately, the command which I think is for placing sniping spots didn't make much sense to me... it looks like it divided up the area I had targeted into about 50 different little sniping spots. Obviously, that's not exactly helpful and certainly didn't attract any of the bots.
What they oughta do is make an extension of the Hammer editor to allow for navigation editing, or perhaps make it possible to use no-draw brushes tied to an entity (maybe something like "func_nav_sniping_spot") to establish a few of the more integratal navigational areas prior to generating a full nav mesh.
There was one other slight irritation I had with the mesh on the stairs... every 3 or 4 steps, the slope or tilt of the mesh would be slightly steeper than the rest (though my stairs have no such variation). This seems to cause the bots to jump. It's not a big deal (aside from making the bots look particularly retarded) but if I knew how to adjust it, I would. I noticed that there seemed to be some commands to adjust the slope/tilt of nav areas, but I didn't try 'em due to my lack of knowledge.