Level Transitions

Tutorial collection, comprehensive listings on main site.

Level Transitions

Postby Tutorial on Sun Mar 27, 2005 11:52 pm

category
General Half-Life 2/Entities

description
Runs you through the process of moving the player from one map to another.

keywords
level, change, transition, transitions, info_landmark, trigger_changelevel.

I will be taking you through the simple process of making a player transfer to another map via a seamless transition. What this means is the player will walk through a trigger, the loading text will appear and then the player will end up in the 2nd map.

When we say seamless what is meant is two areas in each map that are identical, that way the player thinks they are in the same envirnoment, but just a new map.

What you will need to begin with is two maps and an area in each map that is identical. A popular way to do this is via an "S-bend" corridor. This means that once you have finished designing it you can copy it into the new map and delete what is behind the player after the load (and out of his vision) and carry on building the new map. Let's have a look now:

Image

Ok, what we have here is the S bend corridor in Map 1, we will be moving the player into Map 2 shortly. Now once you had finished constructing this corridor you will be ready to add the entities:
Image

As you can see, in Map 1 the area in front has a blank wall and in Map 2 the area behind has a blank wall, you should be able to guess where the level change will take place.

Now, in Map 1 you will require a trigger_changelevel and also an info_landmark. Place the changelevel entity at the end of the corridor, but not to far so that the player can see round the corner, otherwise he would see the blank wall and this would stop it being seamless.

Place the info_landmark in about the centre of the corridor, and about 16 units off the floor will be fine. This is a reference point for the level change and should be in the exact same position in both maps.

Set them up like the below:

Image
Image

Once this is done you will need to change a few properties, first let's open up the trigger_changelevel.

Name: You won't need to fill this for a standard level change, this is so the entity can be enabled/disabled etc.

New Map Name: This is the map you are sending the player to, in this example Map 2 will be where he is going. (Don't use spaces in .bsp names, this is just as a guide)

Landmark Name: This is the name of the landmark that you placed, this will have the same name in both maps, so for now call it lm1

Now once that is done you are set to go with the level change, but we also need a map for the player to arrive in, so select the whole corridor, entities as well, and then copy into Map 2:

Image

Ok, I have moved the trigger_changelevel to the other end this time, this is so that if the player decides to go back it will load him into Map 1 again.

Open up the trigger_changelevel again:

Name: You won't need to fill this for a standard level change, this is so the entity can be enabled/disabled etc.

New Map Name: This will now be Map 1

Landmark Name: And keep this lm1 still.

And that's pretty much it for the basic change.

Remember that there HAS to be a trigger_changelevel in both maps, regardless of whether the player is going back or not. Just move it out the way if the latter appiles.

Blink
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Guessmyname on Wed Mar 30, 2005 3:15 pm

There is a small bug with HL2 changes - sometimes the game spawns you on the origin. Just move your map away from the orign and plop in a teleport there or something. Unless I've been doing this wrong. I hope that not the case...
User avatar
Guessmyname
1337 p0st3r
1337 p0st3r
 
Joined: Sun Mar 27, 2005 10:38 pm

Postby zombie@computer on Wed Mar 30, 2005 3:26 pm

probably something wrong with your landmarks
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Postby RaccoonKing on Wed Jun 01, 2005 4:39 pm

Does this work in HL2:DM?
RaccoonKing
Been Here A While
Been Here A While
 
Joined: Wed May 18, 2005 2:15 pm

Postby Yoshi on Wed Jun 01, 2005 4:44 pm

hell no
User avatar
Yoshi
Pheropod
Pheropod
 
Joined: Mon Apr 11, 2005 3:01 pm

Postby RaccoonKing on Wed Jun 01, 2005 4:57 pm

Well... that's... retarded then.

If anyone has ever played a game called "Incubation" (by BlueByte) they have a system in there where all the players have to stand on certain trigger tiles (generally labelled "A") and when they're all on them, it loads a new map.

I think that method would work for multiplayer also, with a bit of tweaking, and a section under "Third Party".
RaccoonKing
Been Here A While
Been Here A While
 
Joined: Wed May 18, 2005 2:15 pm

Postby acountddd on Sat Jun 18, 2005 3:45 am

what if some players are afk though?
that would stop the game going to the next level
Image
Mess with the best
Die with the rest
User avatar
acountddd
Member
Member
 
Joined: Wed Jun 15, 2005 6:12 am
Location: New Zealand

Postby snufflez on Sat Jun 18, 2005 4:12 am

then they could also input a ban feature :lol:
Dongs.
User avatar
snufflez
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 11, 2004 3:08 pm
Location: HoME

Postby Cargozer on Sat Jul 16, 2005 11:44 am

I know this might be old, but how come when I'm changing into map2 some entitys near the map1's trigger_changelevel/info_landmark teleport with me to the map2. For example, i had 4 boxes, 4 barrels,door and 4 combines with me teleported to the map2 because they were near the trigger_changelevel/info_landmark in map1. ALSO, i got AI Disabled when i had changed to map2 from map1.

Is there eny way to fix these problems?

- Cargozer
Cargozer
Dumpling
Dumpling
 
Joined: Sat Jul 16, 2005 11:38 am
Location: Finland

Postby jaminben on Sat Aug 06, 2005 10:22 pm

I too am having the same problem with the ai being disabled when going from map 1 to map 2.

Any help would be greatly appriciated
jaminben
Member
Member
 
Joined: Wed Aug 03, 2005 3:16 pm

Postby redstar on Sat Oct 01, 2005 7:44 pm

I got the same problem when making level transitions, I get ai disabled, I was able to solve it by making sure there were info nodes in each map, however, there now is another problem, if I go into a new level and return to a previous level all the npcs in that level dissapear
anyone have any solutions to this?
Thanks
redstar
Just Joined
Just Joined
 
Joined: Sat Oct 01, 2005 7:20 pm
Location: Leeds

Postby ishbog on Thu Oct 20, 2005 11:02 pm

did you copy all the AI entities over to the other map? when a map is compiled, it compiles AI. since the game changes map, it changes the entire thing, thus getting rid of anything in the previous map. same with environment lights, 3d skyboxes, etc.
Imagine a world with no hypothetical situations.
http://www.nwmotoring.com
ishbog
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Tue Mar 29, 2005 5:01 am
Location: hell

Postby ShoGun on Sun Oct 30, 2005 5:59 pm

Ah, nvm, it worked now ;).. But there's one more problem for me. When my npc "barney1" reaches the other map, the scripted_sequence's won't work. Did my barney1 get his name changed?
ShoGun
Member
Member
 
Joined: Sat Oct 29, 2005 10:53 pm
Location: Sweden

help

Postby RogueSniper389 on Sun Apr 16, 2006 1:29 am

When I put in a trigger so i could go to one level from another it doesnt work and i do have my landmarks and triggers on both levels

it says
" level *mylevel* could not be found
could not changelevel2 *mylevel*"

*mylevel* is not the real name just an example
RogueSniper389
Member
Member
 
Joined: Fri Apr 07, 2006 8:30 pm
Location: Oregon, USA

Postby verballydecapitating on Sun Apr 16, 2006 2:54 am

Make sure *mylevel* is there?
verballydecapitating
1337 p0st3r
1337 p0st3r
 
Joined: Tue Apr 26, 2005 1:09 pm
Location: New Zealand
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users