What gamemode am I in?

I want my map to start, and then do something based on what GMod gamemode this is. For example, if the map starts up in an RP gamemode, I want to close off a few things and remove some others. If it starts up in Racer, I want traffic cones to appear on the road, along with a few fences… so forth and so on.

info_gamemode doesn’t seem to be able to read the current gamemode or act upon it. Perhaps I’m using it wrong?

I haven’t done any mapping based on gmod gamemodes, but if there is absolutely NO other solution, you could just release several different versions of the map, one for each gamemode.

Thanks for the suggestion, but that right there is the absolute opposite of what I’m trying to accomplish.

Code some lua brush ents or point ents to detect it.

Yeah I agree. I don’t know if what you are suggesting even exists in Source. No-one has made an article about it, so I dunno.

I have a feeling that this isn’t possible. :frowning:

I could do this, but not right now. Give me some time.

Trying to work on a new HB map, current ones aren’t any good.

Your name’s so original. How did you come up with it?

Says the guy with a common internet acronym.

Anyways, I’ve tried playing with the info_gamemode entity and I never could get it to work, if anybody knows the issue, it would be nice. (I usually set the gamemode to base)

What about a logic_case entity? I’m sure you can have bunches of props/brushes to appear or disappear based on whether certain conditions are met, or whether a certain input it fired (in this case the info_gamemode entity)

Although I thought info_gamemode didn’t work with non-vanilla gamemodes?

See, that’s the thing… info_gamemode doesn’t appear to have any outputs, and its documentation is slim to none.

This is an interesting solution. GMod lua does have a constant GAMEMODE that evaluates to the current gamemode. I fail at lua, though, so I have no idea how to use this.

Why would you need an Output for the info_gamemode anyway? It’s only for selecting which Gamemode you have…

But I don’t want the map to select a gamemode… I want to know what gamemode the user has selected, and have the map adapt to that.