How do you make a map transistion?

Avatar
BlackBird Studios
104 Posts
Posted Feb 14, 2012
I've been looking all over YouTube and Google, along with the forums on this site, but no dice. I would love to find a way to make a map transistion that Portal 1 used. If this is not possible, then just someway that my map will transistion. I set up a trigger_changelevel and someone on YouTube said that I didn't need a info_landmark but when I complie the map and run it and trigger the changelevel, it says "No info_landmark found". I brought up the info_landmark but have no clue what to do with it. Please help!
Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Feb 14, 2012
Replied 1 hour later
I found one.
c1nabib1MBc
I dont know how you couldn't find it.
Avatar
BlackBird Studios
104 Posts
Posted Feb 15, 2012
Replied 2 hours later
Ok, I skimmed through that video and unless it says what I am about to ask again than sorry. But I am looking for a map transistion like this one, http://www.youtube.com/watch?v=VcEnQYJjeSU I know you can do it, but no one seems to have a video specifecly for Portal 2. It's all about Half-Life :razz:

I am not looking for a normal elevator transistion but like I said, the transistion from Portal 1, where the map would seem like it would freeze for a quick second, but really be loading the next segment of the map. I would like to use this perticular transistion because I would have the map transistion from Part 1, to Part 2 and Part 2 would have a lot of Part 1 deleted so I could add more things into the Part 2 map since I am at an impass and unable to add anything else. Once again, please help!

Avatar
Spam Nugget
492 Posts
Posted Feb 15, 2012
Replied 1 hour later
I think you will find that the Method is the same for both transitions, its the game engine thats different. Thats why in Portal 2 you get a different effect on transition.
Avatar
ChickenMobile
2,460 Posts
Posted Feb 15, 2012
Replied 1 hour later
For Portal 2 -> landmarks are completely different entities. Check out instances/transitions/transition_entry.vmf and instances/transitions/transition_exit.vmf. Valve used these to execute transitions between maps rather than the the old "info_landmark" with the name of the level to change to inside the trigger_changelevel.

What they did was used a trigger which activated @changelevel (which is a point_changelevel) so then the transition script they made did its' work changing between levels without having to totally recompile maps all the time.

Avatar
BlackBird Studios
104 Posts
Posted Feb 16, 2012
Replied 1 day later
I still can't grasp what the hell Valve is trying to make me do to get this transistion to work. I found the Transistion entry and exit thing, played around with it and I still can't figure it out. I don't know what to do with the transistion script, there is nowhere to it says to putyourmapname here kind of thing. Please, I know it is a lot, but could you possibly put down like step-by-step instructions.
Avatar
Lpfreaky90
2,842 Posts
Posted Feb 16, 2012
Replied 29 minutes later

BlackBird Studios wrote:
I still can't grasp what the hell Valve is trying to make me do to get this transistion to work. I found the Transistion entry and exit thing, played around with it and I still can't figure it out. I don't know what to do with the transistion script, there is nowhere to it says to putyourmapname here kind of thing. Please, I know it is a lot, but could you possibly put down like step-by-step instructions.

Step 1: go to Steam\steamapps\common\portal 2\portal2\scripts\vscripts\transitions
Step 2: create a backup of the file sp_transition_list.nut
Step 3: Grab notepad and open sp_transition_list.nut.
Step 4: find:

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

Select that part and replace it with:

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

// ---------------------------------------------------
//      Awesome mod name here
// ---------------------------------------------------
"yourmapname1",
"yourmapname2",
"yourmapname3",
]

Step 5: save
Step 6: When your maps are done, make sure you pack this script in the bsp with packrat. NEVER require other people to overwrite their own sp_transition_list.nut, they might have made some modifications too!!!

You just told portal 2 the order in which your levels are meant to go.

The instances will trigger this script to run so they no that when you enter the exit of yourmapname1 that they have to go to the entry instance of yourmapname2.

Hope that helped :smile:

Avatar
BlackBird Studios
104 Posts
Posted Feb 16, 2012
Replied 1 hour later
Ok I did everything you said there, and I just compiled both my maps. Then I went into the first one and went through the trigger and nothing happened. It said "end of playtest" but that is it. Do I need to add a trigger kill thing with a game_end or something to have it activate? Also I went into both the info_landmark things in both maps and went to entity scripts and went to manage and added my "transitions/blackbird_transition_list.nut" thing.
Avatar
Robdon
204 Posts
Posted Feb 16, 2012
Replied 2 hours later
Hi,

Can't help too much at the mo, I'm away from home, but if you follow this post and then about 3 posts down I have an attachment 'globals.zip' and this has 2 maps in it that link to each other via trigger_changelevel, maybe that can help you.

http://forums.thinking.withportals.com/post62215.html?hilit=Map1#p62215

HTHs,

Rob

Avatar
MasterLagger
1,695 Posts
Posted Feb 17, 2012
Replied 23 hours later
1) Create a point_clientcommand entity somewhere in the map (name it changelevel or something)
2) Have a trigger_once placed at the place you want to end the level.
3) Have the trigger_once have an output:
OnTrigger : (Name of point_clientcommand) : Command : map (map name here)

So you know how you type "map mapname" into the console to load your map right? Well, the point_clientcommand will automatically enter the command (in this case, load your other map) when triggered in a level. That's how I do my transitions without any scripting. I know I sent you a message to you (BlackBird Studios) but I thought it would be wise to post it for everyone to see an easy shortcut without complex scripting.

Avatar
Spam Nugget
492 Posts
Posted Feb 17, 2012
Replied 49 minutes later
Note with what masterlagger said, if youre using env_globals, do this but use the command changelevel instead of map. This preserves env_global states between the transition.
Avatar
spongylover123
944 Posts
Posted Feb 17, 2012
Replied 30 minutes later
Blackbird,
I don't know what version you want.
The Portal 2 Version
or
The Orange Box Version

Portal 2 method:
Make a transition script (nut)
I prefer to edit the sp_transition_list.nut and save it as a different file.
Go in to the elevator entry and exit instance (arrival_departure_transition_ents.vmf". and find the entity "logic_script"
replace the name of the script with yours.
Add map names to the list at your pleasure.

Orange Box method:
In the map, put a trigger brush at the point where you want to change the map.
Tie it to a "trigger_changelevel".
Place an info_landmark in the middle of it.
then on the map you want to transition to. put an info_landmark there.
set the parameters of the trigger_changelevel.
You're done.

Portal 2 method:
Pros:
You automatically start with a gun.
You can use elevators easily without editing the logic.
You have the Aperture Laboratories logo as the background in the transition, and loading indicatior lights, and logo, without the console appearing.
Wont pull and prop within 50 units of the player's radius.
*Change version of the portal guns fast.

Cons:
*Not for use if you just started or inexperienced with scripting.

Orange Box method:
Pros:
Easy and convenient.
Recommended for inexperienced scripters.

Cons:
Will pull in any prop with in 50 units of the player's radius to the next map.
No loading image or lights or logo.
You wont start with the portal gun. You will have to put one.
You will have to modify the logic of the elevator.

Avatar
MasterLagger
1,695 Posts
Posted Feb 17, 2012
Replied 19 minutes later

Spam Nugget wrote:
Note with what masterlagger said, if youre using env_globals, do this but use the command changelevel instead of map. This preserves env_global states between the transition.

But that's only if your using env_global, but still, good point. I would imagine if I was making Co-op maps that I would have to use "changelevel" command instead of just "map."

Avatar
Spam Nugget
492 Posts
Posted Feb 18, 2012
Replied 7 hours later
Yes, for coop too. Just thought it was an important point to make.
Advertisement
Registered users don’t see ads! Register now!
Avatar
BlackBird Studios
104 Posts
Posted Feb 18, 2012
Replied 11 hours later
I really can't thank you guys enough. This has helped me out so much and I hope for future purposes, this conversation helps somebody else out. Don't think you're out of the ropes just yet, I'm sure Hammer will screw me over eventually. :lol:
Until then, bye.