Level Transitioning

Avatar
mysteryman141
14 Posts
Posted Jul 04, 2012
How do i transition from a level with loding screens to another level. I am not using the testchamber elevators.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Brainstone
401 Posts
Posted Jul 04, 2012
Replied 26 minutes later
Have a trigger_changelevel with an info_landmark in the middle of it. Enter the name of the new level aswell as the name of the landmark in the properties of said trigger.

(The landmark is only needed as a formality, initially for back- and forward two sided transitions)

Avatar
ChickenMobile
2,460 Posts
Posted Jul 04, 2012
Replied 5 hours later
You never go backwards in Portal 2. Therefore it may be easier to just use a point_changelevel. With the transition instances which valve nicely gave us.
The instances to use are instances/transitions/transition_exit.vmf for the exit transition (end of map) and instances/transitions/transition_entry.vmf for the start of a transition (new map).

In order to use the exit transition correctly with the exit transition instance, create a point_changelevel and name it @changelevel.
With your exit instance you will have to collaspe it. Select your exit transition instance and go to the instancing menu and click collaspe -> selection. Doing that will automatically name your instance entities. You could rename them back to normal i.e. removing the AutoInstance1- prefix but I don't think it entirely matters.
Now click the trigger from the collapsed instance and add a new output: OnStartTouch->@changelevel -> ChangeLevel -> mapnamehere. You can resize the trigger to however big you want it, so then the area the player will start the transition is bigger.

P.S. @Brainstone: Portal 2 uses a info_landmark_exit entity and a info_landmark_entry entity for transitions.

EDIT: In order to spawn in the correct place, the landmarks need to be in the same relative position in the new map.

Avatar
portal2tenacious
393 Posts
Posted Jul 05, 2012
Replied 1 hour later
What I do is use a point_clientcommand with the input command and a parameter of map <name of map> and for an elevator, should you use one, I add a counter to the logic_choreographed_scene.
Avatar
Robdon
204 Posts
Posted Jul 05, 2012
Replied 10 hours later
Hi,

Took me a while to get trigger_changelevel working correctly, but if you want an example I've attached 2 maps to this post.

Map1 & Map2

If you walk into the black text on the back wall of the room, you will be transported from map1 to map2, and then you can walk into the black texture in map2 to get back to map1.

There is also an example in those rooms of how to use Globals between maps. In map1 the button on the right turns the global 'on' and the button on the left turns the global 'off'. In map2 pressing the button will display if the global is 'on' or 'off', this shows how the global can be used between maps.

Not sure about loading screens between maps now, I while ago I did play around with making a 'mod' and packing all the maps into there and then you could include loading screens, but looking at the page I used learn that, looks like it might not be working now since the last DLC. Maybe you could try playing and see what you can come up with...

http://www.se51.net/2011/09/15/how-to-make-your-own-portal-2-mod

HTHs,

Rob

Attachments
level_chage.zip
0.00 MB 45 downloads
Avatar
FelixGriffin
2,680 Posts
Posted Jul 05, 2012
Replied 2 hours later
Lots of stuff seems to have been broken by the DLC. I'll see if I can get some sort of skeleton mod working.
Avatar
Fracture
797 Posts
Posted Nov 19, 2012
Replied 4 months later
i found that testing to see if this works in my personal map. It had mixed results. The trigger wont react if you have noclip turned on, so if you turn it off, it does work
Avatar
BenVlodgi
633 Posts
Posted Nov 19, 2012
Replied 2 hours later
is this for a mod or mappack?
Avatar
ChickenMobile
2,460 Posts
Posted Nov 19, 2012
Replied 1 hour later

Fracture wrote:
i found that testing to see if this works in my personal map. It had mixed results. The trigger wont react if you have noclip turned on, so if you turn it off, it does work

Why would you even want to transition with noclip on?

Avatar
BenVlodgi
633 Posts
Posted Nov 19, 2012
Replied 1 hour later

ChickenMobile wrote:
Fracture wrote:

i found that testing to see if this works in my personal map. It had mixed results. The trigger wont react if you have noclip turned on, so if you turn it off, it does work

Why would you even want to transition with noclip on?

Avatar
Fracture
797 Posts
Posted Nov 20, 2012
Replied 2 hours later
@chicken, I was too lazy to walk all the way from the beginning of the map to the end of it... In retrspect i guess i could have easily put a new spawn point right next to the trigger instead
Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Nov 20, 2012
Replied 2 hours later

Fracture wrote:
@chicken, I was too lazy to walk all the way from the beginning of the map to the end of it... In retrspect i guess i could have easily put a new spawn point right next to the trigger instead

Indeed! :lol: