Need help on editing existing GMOD maps.

  1. Is there any way to make Garry’s Mod automatically load the next save you created after you trigger something at the end of the level (for example got in a car in gm_bigcity) and spawn at the beginning of the next save (just like it happens with levels in Half-Life 2)?
  2. Can you make GMOD play custom soundtracks when they are triggered at specific locations?

Any help would be greatly appreciated, as I’m completely new to mapping. Thanks in advance. :slight_smile:

  1. Trigger_changelevel
  2. I can only find ways of playing ambient sounds in hammer, you could always try lua_run to play soundtracks on the client.

For a soundtrack, just use ambient_generic with your music (.wav is preferred but .mp3 is less costly), and have it activate with a trigger

Thanks, now there’s a start. But I don’t know how do you edit existing GMOD maps? I heard that it’s a lot of work or am just wrong?

decompiling a bsp is easy use bsp source the hard work comes when trying to compiling it again , a decompiled bsp is never 100% ok and you’ll need to fix broken brushes and entities, if you know lua it might be easier to make a lua script for a gamemode that changes the level via a concommand when a player is at a certain postion on the map

That’s the thing, I dont really know anything about lua. If you can can help me out at least where to start with this script it will be greatly appreciated.

Alright, figured out how to use that trigger_changelevel. However, can you actually make all the creations that I spawned (props, vehicles, weapons, NPCs…) on the edited map to be pernament? Like when you load that map, all the stuff I placed would still be there.

You’ll have to do that through lua, I believe there are some addons you can use to make props/entities permanent.

Yeah, I know that addon - it’s PermaProps. However it has two major issues - you cannot save NPCs with weapons, they will just spawn with nothing. Also it doesn’t save any welded props.
About lua, can you explain a bit more? I’m pretty much clueless about it.

You’ll have to run server side lua to spawn entities using ents.Create

Check out the Gamemode Creation wiki page for an easier understanding of how to do that.

Okay, thanks for the help. Gotta be honest, I can’t really figure out how to do this. However, I don’t know if it’s doable, but maybe it would be easier to make the trigger load the next created SAVE instead of a LEVEL? If it is, anyone know how?