So i was looking into Map and Spawn Manager to understand the workings behind it all. I understand the SpawnManager Code and wrote my own scripts that seems to do the same thing so startet the server without Map and Spawn manager just with my script and it works. so i was wondering what they really do.
im also wondering if anyone knows what game types are for. I can’t find anything on the DOCS about it
mapmanager looks to be written to handle different maps cargen, but I’m not sure it has much uses (cc @nta as they can provide a definitive answer)
SET_GAME_TYPE → ConVar “gametype” - just used for displaying the game type in the ui
SET_MAP_NAME → ConVar “mapname” - just used for displaing the map name in the ui
Yeah ive seen that it also provides events
OnClientMapStart
OnClientGameTypeStart
OnClientMapStop
OnClientGameTypeStop
GetMapDirectives
i wonder if thats the only use tho
In case you haven’t looked
vehicle_generator
is handled by mapmanager as Avarian said, while spawnpoints use the GetMapDirectives
event and are handled in spawnmanager.
Overall it seemingly allows for easier cleanup for some resources so you can swap between gamemodes and without needing to reconnect or restart the server.
yeah ive seen the part where it spawns
“vehicle_generator “airtug” { -54.26639938354492, -1679.548828125, 28.4414, heading = 228.2736053466797 }”
that seems to be more of the obvious part. i was looking into the @mapmanager_client.lua and @mapmanager_server.lua. i saw that they have some events that you can use like “onClientMapStart”
but thx for the answer about the easy switching of gamemodes. I never really looked into the whole gamemode thing but that seems to be it.
THX