Level Transition (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
"your_first_level",<br>
"your_first_level",<br>
"your_second_level",<br>
"your_second_level",<br>
]<br>
<br>
<br>
Place the levels you want to play in order from top to bottom(will be played first to last). As long as you list the level there and keep everything in the same format, and have the elevators in each level listed, you will transition to the next level.  
Place the levels you want to play in order from top to bottom(will be played first to last). As long as you list the level there and keep everything in the same format, and have the elevators in each level listed, you will transition to the next level.  

Revision as of 15:52, 21 May 2011

PAGE STILL UNDER CONSTRUCTION, DO NOT TAKE THIS INFORMATION AS 100% TRUE AS MESSING WITH THE FILES MENTIONED IS DANGEROUS TO THE FUNCTIONALITY OF YOUR GAME

To make a level transition, you must first create an elevator for both an entrance and exit to all the levels that you want to connect. Then go into "C:\Program Files\Steam\steamapps\common\portal 2\portal2\scripts\vscripts\transitions" for 32 bit and C:\Program Files(x86)\Steam\steamapps\common\portal 2\portal2\scripts\vscripts\transitions" for 64 bit. There are two files named "sp_transition_list.nut" and "sp_elevator_motifs.nut". Open each in Notepad. Please read the instructions carefully as messing with these files is dangerous and can cause problems with your game.

First, in "sp_transition_list.nut" there is a list of maps, press "Ctrl+F" and type in "demo" to get to the final maps on the list. The last map should be "demo_paint". You must copy the format of the header and the levels below and paste it on a line beneath the "demo_paint" level. The result should look like this:

// ---------------------------------------------------
// Demo files
// ---------------------------------------------------
"demo_intro",
"demo_underground",
"demo_paint",

// ---------------------------------------------------
// Your title
// ---------------------------------------------------
"your_first_level",
"your_second_level",
]

Place the levels you want to play in order from top to bottom(will be played first to last). As long as you list the level there and keep everything in the same format, and have the elevators in each level listed, you will transition to the next level.

SAVE THE FILE AND CLOSE.

Next, open "sp_elevator_motifs.nut". This is a smaller file, and the level list is much shorter. Scroll to the last line that reads "{ map = "sp_a4_jump_polarity", speed = 200 },". If you copy this format and paste your levels on each succeeding line, you can control the speed at which you enter the level.

Result should look like this:

       { map = "sp_a4_jump_polarity", speed = 200 },

{ map = "your_first_level", speed = 300},
{ map = "your_second_level", speed = 300 },

]

Note the bracket at the end, this must be kept at the end of the entire list to maintain functionality. The order of the maps on this list must be the same as the maps on the first file you edited.

SAVE THE FILE AND CLOSE.

Congratulations, your maps now transition!