Level Change

Avatar
Interitus
145 Posts
Posted Jan 08, 2008
Question for you guys. I've made three maps,and I'm using trigger_changelevel and landmark to change maps between them
But, the areas change rotation. In map 1 you enter an elevator from the east, then you exit north in map 2. Because of the rotation, I'm being dropped out of the world.. is there a way to have it rotate directions or something? so that I spawn inside where I'm supposed to be?

Or do the parts of the map have to match perfectly? even if I rotate the landmark and trigger_changelevel?

Advertisement
Registered users don't see ads! Register now!
Avatar
msleeper
4,095 Posts
Member
Posted Jan 08, 2008
Replied 15 minutes later
I think the maps have to be exact. Try messing with the orientation and other properties of the info_landmark in one of the maps to see if you can force a rotation. If not, try physically rotating the map.
Avatar
Syon
44 Posts
Posted Jan 08, 2008
Replied 6 hours later
I had this same issue. I'm working on a set of maps at the moment and didn't realize that when you do a level change the elevators have to be facing the same direction in each level. I searched for quite awhile trying to find a solution, but the only thing I could come up with was rotating an entire level to get the elevators to match (select all -> transform -> rotate on z axis -> fix all the doors in the level to open the right direction.)

Also, if you're falling through the world, be sure your landmarks are in exactly the same place relative to the elevator shaft in both levels.

Avatar
dvlstx
183 Posts
Posted Jan 08, 2008
Replied 7 hours later
I, too, had the same problem. If the front of the elevator is facing right in the first level, the front of the elevator in the second level must also be facing right. And the landmarks HAVE to be in the same spot in the elevator shaft. The best way to ensure this is to copy and paste the elevator and shaft from level 1 to the start of level 2, but move the elevator up to the top of the shaft. (where it stops.) This may sound confusing, but after you tinker around with it for a while, it will come to you.
Avatar
Interitus
145 Posts
Posted Jan 08, 2008
Replied 4 hours later

Syon wrote:
was rotating an entire level to get the elevators to match (select all -> transform -> rotate on z axis -> fix all the doors in the level to open the right direction.

Waaaauuuughhh!!! don't do that! make sure all your brushes are aligned to the grid! something could throw your brushes off grid and create lots of problems! and rotating everything doesnt always rotate the angles of entities, so you may have to (or have had to) rotate your entities. just be careful

Yeah, I'm going to have to move the elevator. if I tried to rotate my entire map, I'd have to go around fixing a LOT of stuff. I know in map 2 this wont be too much work, but I havent looked in map 3 yet.

Avatar
Interitus
145 Posts
Posted Jan 08, 2008
Replied 4 hours later
Ok, I've moved things around and got myself appearing in the right spot.

Now I've got a NEW problem. My elevator is within the trigger_changelevel and is being transferred to the next map WITH me. but its not tied to the elevator in the next map, so its getting me stuck. what the hell!?

.... oh god. I just took a look at the demo map, and they have the entire elevator surrounded by a trigger_transition.... meaning they transfer all the freaking entities to the next map...

Is it not f'ing possible to transfer JUST the player?!? if so, how?

Avatar
Mapster
396 Posts
Posted Jan 09, 2008
Replied 3 hours later
Remember to make the landmark names EXACLY the same, including capitals, _'s and so on.
Also you HAVE to have a change level brush in your map even if you don't want the player to change maps.
Avatar
Interitus
145 Posts
Posted Jan 09, 2008
Replied 4 hours later

Mapster wrote:
Remember to make the landmark names EXACLY the same, including capitals, _'s and so on.
Also you HAVE to have a change level brush in your map even if you don't want the player to change maps.

all the names are correct. I have a change level brush in both maps, I even tried moving it up above the elevator into empty space, and it still takes the player, and everything else.

Avatar
Syon
44 Posts
Posted Jan 09, 2008
Replied 4 minutes later
Unless you use a trigger transition, all non-static entitys nearby to the changelevel will be transfered to the next map.

You may not be able only transfer the player to the next level. I was thinking you might be able to use a trigger_transition to surround only the player, but that depends how a trigger_transition selects entitys (is it based on an entitys origin, or whether it's completely inside the trigger, or whether it's partially inside the trigger? not sure.)

Honestly, I would try to set it up as much like the demo level as posible. It takes a bit of work, but once it's done you can pretty much just copy -> paste for future work.

Avatar
Mapster
396 Posts
Posted Jan 09, 2008
Replied 7 hours later

Interitus wrote:
all the names are correct. I have a change level brush in both maps, I even tried moving it up above the elevator into empty space, and it still takes the player, and everything else.

Oh, perhaps you tried moving the landmark's origin instead of the actual entity, make sure that you did this correctly.

Avatar
Interitus
145 Posts
Posted Jan 09, 2008
Replied 4 hours later
Nope I didnt touch the landmark, I moved the trigger_changelevel. in the demo map its an odd strip in the elevator shaft.
Avatar
Interitus
145 Posts
Posted Jan 11, 2008
Replied 1 day later
I dont know what I did, but now its getting rid of the elevators when it loads the next map. not the invisible track_train tho, so I still ride down.

Is there a good elevator prefab out there that hasnt been ripped from the official maps, and works on map transitions? I'm getting really frustrated with this.

I might just get rid of the actual moving elevators.... have them make the sound, but not actually move... could simplify things...

Edit: Ok, I have somehow miraculously fixed it. I think what happened was that the elevator stuff didnt have the same names, so they were duplicating, but haveing a global entity name was messing it up. I got rid of the global name, but have the props named the same, and it seems to work....

Avatar
Interitus
145 Posts
Posted Jan 13, 2008
Replied 2 days later
Ok, got the transitions working. Still a little buggy, but usable.

On the start map, I have a non-moving elevator, and I've given the door and the elevator body props names, as well as global entity names. On the next map, I have a working elevator. The doors and body have the same names as the start map props, but no global entity names. I've got the trigger_levelchange as a cube above the elevators.

The buggy part, is that I seem to get stuck in the elevator when i get to the new map. Partly clipping in the elevator. I seem to get pushed out after a little bit, and I can kinda move myself out.
The placement of everything seems to be correct, equal distances and such. Any ideas?

Also, at the start of each map I have a portal gun spawned where the player is, but if the player comes from an earlier map, I'm not always in the right spot to pick it up again, so it'll drop to the floor. Anyway to prevent it from showing if its already equipped?

Avatar
Dewin
43 Posts
Posted Jan 13, 2008
Replied 5 minutes later

Interitus wrote:
Also, at the start of each map I have a portal gun spawned where the player is, but if the player comes from an earlier map, I'm not always in the right spot to pick it up again, so it'll drop to the floor. Anyway to prevent it from showing if its already equipped?

Doesn't trigger_levelchange bring your weapons with you?

If so, you wouldn't need to put a portal gun on every level except for testing, and impulse 101 could take care of that.

Avatar
Interitus
145 Posts
Posted Jan 13, 2008
Replied 41 minutes later
er, yeah. the weapon comes with me from previous maps, but I put it in there in case the user starts with map 2 instead of map 1 or something... perhaps I should remove it?
Avatar
username
67 Posts
Posted Jan 13, 2008
Replied 1 hour later
Here's what I did:

Create a weapon_portalgun. Name it something, like ASPHD.
Now, create a logic_auto. Give it one output: OnMapTransition, ASPHD, Kill.
Now, when you transition to the map, it won't be there, but if you start at the map, it will.

Avatar
Interitus
145 Posts
Posted Jan 13, 2008
Replied 2 hours later
Heyy... thats a good idea. Thanks
Advertisement
Registered users don't see ads! Register now!
Avatar
Dewin
43 Posts
Posted Jan 14, 2008
Replied 2 hours later
If the player starts with map 2 instead of map 1, they'll start whereever the info_player_start is, not the elevator, so you can place the gun directly on the info_player_start....

and maybe with some use of global entity names, either remove it or conditionally spawn it based on whether the player already acquired one or not on a previous level