[MvM] Robot Problems? HELP!

taxlor203

L1: Registered
Feb 10, 2013
5
1
Hi, everyone ;). So here is my situation:

I wanted to create my own MvM map with Hammer for TF2, and I wanted to start easily cuz I'm still a beginner...
I had a look to the mvm_example given by Valve, and I created the hatch and its corresponding triggers, sounds, particles + all the Game Logic of MvM.*
And I also added the red and blu spawnpoints etc...

However, when I compile my map TF2 does not crash, but in console I got an error about "nav mesh populator": something like "There is no bot nav func in respawnroom, this is caused either by a missing func_respawnroom or spawnpoints not within it. Bots will act poorly."
BUT, the bots don't even appear in their spawnpoints (I took a pop file from the coaltown ones, and spawnpoints are called spawnbot so the error is not here)
So, I came back to mvm_example, and, when I compiled it, I got EXACTLY the same error (I'm pretty sure I did not modify anything in it). D:
I even had a look to decompiled Valve MvM maps but nothing.
If that could help, I noticed that all the mvm maps I saw (my map, mvm_example and valve decompiled maps) had a similar problem: 1 of the outputs of the team_round_timer enable the game_populator entity "OnSetupFinished", but Hammer does not recognize this entity game_populator (it is highlighted in red).

If you can't give a great answer, can you just say if your compiled version of mvm_example work and if it recognizes this game_populator entity?:confused:
Anyway, is there a vmf example showing a very simple mvm map working?

Thanks for reading. :)
 

Freyja

aa
Jul 31, 2009
2,994
5,813
For bots to be able to move, they need a "nav mesh", it's basically a series of polygons that spread across the ground, and tell the bots if they can move there or not. A freshly compiled map doesn't have one, hence the error, you need to get the game to generate it for you.

Simply open the console and type "nav_generate" with sv_cheats set to 1. The game will probably freeze, but give it a few minutes to do all it's calculations.

If you want to SEE the nav mesh that the bots are using, type nav_edit 1. Sometimes, especially with dropdowns like the official MvM maps, the nav mesh won't generate up there. The calculation starts from whereever your player is standing, so if there's somewhere you can't get from there - then the game will think the bots can't either.

nav_mark_walkable BEFORE typing nav_generate will create a "sample point" that the nav file will generate from. You can place a few - one where they spawn, one on the ground and a few others around just to make sure the nav mesh gets everywhere you want.

When it's done, a new file will be created next to your map called mvm_yourmap.nav
You need to distribute this with your map. You can pack it in too.



Also, I believe game_populator is an entity that is created on compile, not actually placed in hammer. You can still send outputs to it, as it will be there in game, but it will show up as invalid in hammer, don't worry about it.
 

taxlor203

L1: Registered
Feb 10, 2013
5
1
Yay, thank you very much Aly!!!! It will helps me a lot!
I will try it as soon as possible.
 

henke37

aa
Sep 23, 2011
2,075
515
No, game_populator isn't created at compile time. It is created at runtime.
 

taxlor203

L1: Registered
Feb 10, 2013
5
1
This works perfectly now! I will upload a MvM map soon (will be probably medieval ;-)). Thx for support.