Background map at game start up

Hi there FP, trying to make gmod use a hl2 background map at startup, but can’t figure out for the life of me how.

I’ve tried MacGyver’ing a little lua script in garrysmod/lua/menu, but nothing happens. On the other hand, when I place “RunConsoleCommand( map_background background01.bsp )” at the bottom of one of the lua scipts already in there, I get this:

http://puu.sh/jrX21/394ba8f3f8.jpg

Please bestow upon me the fix to this problem without bashing my poor lua’ing skills and tell me which lua folder to put it in. And thought I had while typing this post, should I have used “RunConsoleCommand(“map_background”, “background01.bsp”);” instead?

Yes.

I placed it in the background.lua file and now it loads each time you exit/load up the main menu. Thanks.

For those who are curious, I placed the command before the last “end” of “local function Think( tbl )”

http://puu.sh/js3lA/4d826df65d.jpg

thx for the tip :slight_smile: but when i do it after 5 seconds the camera view jumps to behind the player models head so it then blocks part of the view is that normal ??

Yes, it is. I had to decompile the map and move the camera up a bit. Also, where I put the command, it makes it impossible to play garrysmod. Everytime you will try to load a map, it will not load the map you wanted to play, instead loading the background one. I recommend placing it in the autoexec file.

ahh ok so it would ok if i created a custom background map cool :slight_smile: thx