Garry's Mod

Garry's Mod

Sanic Hegehog
 This topic has been pinned, so it's probably important
Xyxen  [developer] Aug 31, 2013 @ 8:06pm
Sanic isn't moving! What can I do?
First off: are you near spawn? Sanic has spawn protection on by default. They won't chase you if you're within 200 units of a spawnpoint (but they can still attack you).


You're not near spawn and Sanic still won't move? Alright. Let's get into some details.

Sanic is based on the new NextBot AI in Garry's Mod. Because of this, they might not be able to move on maps where other NPCs can. To solve this problem, simply run nav_generate to create a navigation mesh for Sanic's pathfinding and awareness. However, please note that this could take a long time, and it WILL restart your map. Hang on, though. There are a few other potential issues you may encounter.

When you run the above command, it'll search for walkable areas beginning from a spawn point. If there are areas on the map you would like Sanic to walk on that are not directly accessable from spawn by doing nothing but walking, you'll need to look at them and run nav_mark_walkable (with sv_cheats set to 1!) to let the generator know people can walk in that area. For instance, the grassy area on gm_flatgrass requires you to jump down to reach it. Therefore, you'll need to run nav_mark_walkable while looking somewhere on the grass.

If there is already a navigation mesh file for the map, and it's not working, you're going to need to delete it manually. First, exit Garry's Mod--it'll probably be hanging onto the file and won't let you remove it. Next, navigate to your Garry's Mod directory, and locate maps/<mapname>.nav, where mapname is the name of the map you're trying to generate a navigation mesh for. Delete or rename this file, relaunch Garry's Mod, and try again.
Last edited by Xyxen; Aug 16, 2014 @ 10:16pm
< >
Showing 1-15 of 26 comments
Gnome Sep 2, 2013 @ 5:07pm 
Still isn't moving. Running it on gm_flatgrass.
Xyxen  [developer] Sep 3, 2013 @ 1:26am 
Well, there's another technical issue here. nav_generate searches for walkable areas starting at a spawnpoint. It won't go anywhere you can't get to by just walking. Beginning at the flatgrass spawn, you would have to drop down to the field--so it won't generate navigation information for that area. You'll have to tell it explicitly by looking at anywhere on the grassy area and using nav_mark_walkable before using nav_generate.
Last edited by Xyxen; Sep 4, 2013 @ 6:10pm
Simple Lemon Sep 4, 2013 @ 2:22pm 
I tried this, and it is not working on that map gm_flatgrass
mcd1992 Sep 4, 2013 @ 6:40pm 
Same here, he wont move on flatgrass :c
sleeeeeenky Sep 14, 2013 @ 3:45am 
I did what you said, and my game turned into Left 4 Dead 1, no jokes.
ShinitaiYuda Sep 25, 2013 @ 4:56am 
thanks i woundered why sanic wouldent do anything also can you make sanix?
Green Lawny Nov 24, 2013 @ 9:36am 
For flatgrass, Type nav_edit 1 into the console, then look at the grass and type nav_mark_walkable. then type nav_generate and when it loads back in type nav_edit 0. it should work then.
Nomyhoe Dec 2, 2013 @ 7:26pm 
listen making a mod that needs 4 commands like...thats not how people should put up with for just one mod ♥♥♥♥♥♥♥ stupidity!
Xyxen  [developer] Dec 3, 2013 @ 1:05am 
Originally posted by U.S RANGER 2020:
listen making a mod that needs 4 commands like...thats not how people should put up with for just one mod ♥♥♥♥♥♥♥ stupidity!

I appreciate that it's a lot to go through, but it's literally not in my control at all. The people making the maps are supposed to be doing this for you! It's not something fancy I've created for this mod in particular. It's something built into the Source engine, and it's a huge leap in AI pathfinding. As far as I know, the old AI systems the default NPCs use aren't exposed to Lua anymore--so I can't use them. This is what we have, and I'm sorry that it's a hassle.
Bobson Dugnutt Jan 4, 2014 @ 6:11am 
I did the Nav_generate command, it disconnected me from single player. what the flub just happened
bubrito bubstice Jan 5, 2014 @ 4:10pm 
Hey guys, if you do the 'nav_mark_walkable' thing and you spawn Sanic and he still doesn't chase you, that's because you're too CLOSE to him, meaning, the Spawn Protection code is working and won't allow Sanic to chase you. A simple fix for this is to simply use Noclip and fly a bit away... He'll then start his pursuit.
Chris Jan 28, 2014 @ 4:46pm 
Sanic crashes my game, is there anything i need specific to make this work?
sleeeeeenky Jan 28, 2014 @ 7:10pm 
nope
he only moves on gm_construct every nextbot should only work on gm_construct
The Mann Himself Dec 12, 2014 @ 12:52am 
I want Sanic to move in gm_bigcity, but it takes him WAY too long to learn it, what can I do?
< >
Showing 1-15 of 26 comments
Per page: 1530 50