GSC reference › Built-in
GetRootMapName()
Built-in (engine)
Server
Returns the root map of a mission
Signature
GetRootMapName([currentmap])
Parameters
| Name | Required? | Details |
|---|---|---|
| currentmap | Optional | the name of the current map. If ommitted, use Dvar sv_mapname |
Example (from Treyarch's docs)
level.rootMap = GetRootMapName( "cp_mi_cairo_ramses2" )
Real uses in BO3's scripts
Called 61 times in the decompiled scripts. A few, zombies first:
- scripts/cp/_accolades.gsc, line 60
level.var_deb20b04 = getrootmapname(); - scripts/cp/_collectibles.gsc, line 40
level.map_name = getrootmapname(); - scripts/cp/_devgui.gsc, line 557
if(!isdefined(getrootmapname())) - scripts/cp/_laststand.gsc, line 124
if(isdefined(getrootmapname())) - scripts/cp/_skipto.gsc, line 2120
if(!isdefined(getrootmapname()))
Related built-ins
- SetMapNameString()Set the map name string
- MapShaderConstant()Maps a shader constant to an index.
- MapFloat()Returns a lerped value between <from> and <to> based on <time>.
- SetMapCenter()Set the center of the map (used by the network code to optimize position data)
- SetClientNameMode()Alters the way that the player name is updated, to prevent cheating by spectators altering their name to communicate with active players.
- SetPlayerNameString()Set the player name string for a HUD element
- AnimMappingSearch()Searches animation mapping table to return a animation name when given a animation mapping alias name.
- GetMpDialogName()Get the name of the mpdialog bundle of the currently associated character body
- SetDrawName()Sets the drawnname of client ent
- Map_Restart()Restarts the map
- GetMissionName()Returns the name of the mission this map is part of
- GetAttachModelName()Returns the name of the attached model at the given attachment slot
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).