@CJLERCH: that script I was meaning is the
"sp_transition_list.nut" (inside scripts/vscripts/transitions).
This is at the top of the code:
FIRST_MAP_WITH_GUN <- "sp_a1_intro4"
FIRST_MAP_WITH_UPGRADE_GUN <- "sp_a2_laser_intro"
FIRST_MAP_WITH_POTATO_GUN <- "sp_a3_speed_ramp"
LAST_PLAYTEST_MAP <- "sp_a4_finale4"
Then there is the following code (line 393 and below):
DumpMapList()
local portalGunCommand = ""
local portalGunSecondCommand = ""
local foundMap = false
foreach (index, map in MapPlayOrder)
{
if (MapPlayOrder[index] == FIRST_MAP_WITH_GUN)
{
portalGunCommand = "give_portalgun"
}
else if (MapPlayOrder[index] == FIRST_MAP_WITH_UPGRADE_GUN)
{
portalGunSecondCommand = "upgrade_portalgun"
}
else if (MapPlayOrder[index] == FIRST_MAP_WITH_POTATO_GUN)
{
portalGunSecondCommand = "upgrade_potatogun"
}
if (GetMapName() == MapPlayOrder[index])
{
break
}
}
TryDisplayChapterTitle()
if (portalGunCommand != "" && GetMapName() != "sp_a2_intro" && GetMapName() != "sp_a3_01" )
{
printl( "=======================Trying to run " + portalGunCommand )
EntFire( "command", "Command", portalGunCommand, 0.0 )
EntFire( "@command", "Command", portalGunCommand, 0.0 )
}
if (portalGunSecondCommand != "")
{
printl( "=======================Trying to run " + portalGunSecondCommand )
EntFire( "command", "Command", portalGunSecondCommand, 0.1 )
EntFire( "@command", "Command", portalGunSecondCommand, 0.1 )
}
}
There is also a complete list of all maps in Portal2 in the script, and as that part of the code I posted above seems to say, depending on the map name you'll be given:
-
a primary fire gun > from map "sp_a1_intro" to "sp_a2_laser_intro" (non inclusive)
-
a dual fire gun > from "sp_a2_laser_intro" to "sp_a3_speed_ramp" (non inclusive)
-
a potato gun > from "sp_a3_speed_ramp" onwards until "sp_a4_finale4"
However, since none of us are naming our maps like VALVe's :p, what happens then? there was an old post that Kennkong made on this topic, take a look here.
That was all I know.