Arrival and Departure Elevators

Avatar
portal2companioncube
108 Posts
Posted Feb 18, 2012
I put an arrival elevator in my map and the player didn't spawn in it at the beginning of the map. I didn't see an info_player_start in the elevator, either. Do you have to put that in manually, or what?
Thanks!
Advertisement
Registered users don’t see ads! Register now!
Avatar
CamBen
973 Posts
Posted Feb 18, 2012
Replied 1 minutes later
Yes. You have to put it in manually.
Avatar
FourthReaper
356 Posts
Posted Feb 18, 2012
Replied 11 minutes later

CamBen wrote:
Yes. You have to put it in manually.

Uhmm, no? I'm gonna' go with no.

I have been stuffing the basic instances in every map automatically so I'm not sure if this alone covers it, but I believe that for an elevator to work you need the instance "transitions/arrival_departure_transition_ents.vmf". Don't put in an info_player_start manually.

CamBen you trollin' or am I missing something? :confused:

Avatar
MasterLagger
1,695 Posts
Posted Feb 18, 2012
Replied 12 minutes later
Actually, you can put one in manually, but it would be better if you used "transitions/arrival_departure_transition_ents.vmf" transition that FourthReaper mentioned.
Avatar
CamBen
973 Posts
Posted Feb 18, 2012
Replied 2 hours later

FourthReaper wrote:
CamBen wrote:

Yes. You have to put it in manually.

Uhmm, no? I'm gonna' go with no.

I have been stuffing the basic instances in every map automatically so I'm not sure if this alone covers it, but I believe that for an elevator to work you need the instance "transitions/arrival_departure_transition_ents.vmf". Don't put in an info_player_start manually.

CamBen you trollin' or am I missing something? :confused:

oops. I was thinking that they meant they were going to make one without instances.

Avatar
ChickenMobile
2,460 Posts
Posted Feb 19, 2012
Replied 3 hours later
You will need to put in a spawn manually if you do not use any scripts, however the player should teleport automatically to the lift if the correct scripts are placed in (like FouthReaper said)
img
Avatar
HMW
806 Posts
Posted Feb 19, 2012
Replied 15 hours later
You should not place a player start directly inside the elevator. This creates a highly unpredictable bug that programmers call a "race condition".

There is a trigger_once in the elevator that starts it up when the player is teleported in. The problem is that this trigger_once may activate before all of the other things in the map have fully loaded and initialised themselves. Depending on the size of your map, the order in which the entities load and the timing of the loading versus the triggering event, it may work just fine, or it may suddenly and randomly fail.

Normally the arrival/departure instance handles the player spawning, but if you don't want to use that, simply place your spawn point, along with the desired type of portal gun, in an empty room and let a logic_auto activate the entity named "@arrival_teleport".
A logic_auto does ensure that everything has loaded before activating, thus avoiding the race condition.

(* Replace "@arrival_teleport" for "@test_dome_lift_entry_teleport" if you're using the 50's style elevator.)

Avatar
portal2companioncube
108 Posts
Posted Feb 19, 2012
Replied 4 hours later
So, I put "arrival_elevator_a4_logic" in "arrival_elevator_a4_base" right where it should be. Will that work?
Avatar
Spam Nugget
492 Posts
Posted Feb 19, 2012
Replied 20 minutes later

HMW wrote:
You should not place a player start directly inside the elevator. This creates a highly unpredictable bug that programmers call a "race condition".

There is a trigger_once in the elevator that starts it up when the player is teleported in. The problem is that this trigger_once may activate before all of the other things in the map have fully loaded and initialised themselves. Depending on the size of your map, the order in which the entities load and the timing of the loading versus the triggering event, it may work just fine, or it may suddenly and randomly fail.

Normally the arrival/departure instance handles the player spawning, but if you don't want to use that, simply place your spawn point, along with the desired type of portal gun, in an empty room and let a logic_auto activate the entity named "@arrival_teleport".
A logic_auto does ensure that everything has loaded before activating, thus avoiding the race condition.

(* Replace "@arrival_teleport" for "@test_dome_lift_entry_teleport" if you're using the 50's style elevator.)

Thanks for that, you may have just helped me out there! This probably explains why my custom elevator instances ive been using have had bugs, i was sapwning the player inside the elevator.

Advertisement
Registered users don’t see ads! Register now!
Avatar
HMW
806 Posts
Posted Feb 21, 2012
Replied 1 day later

portal2companioncube wrote:
So, I put "arrival_elevator_a4_logic" in "arrival_elevator_a4_base" right where it should be. Will that work?

Yes, you need both of those, in the correct position relative to each other.

In addition, you have to either:

  • place the instance "transitions/arrival_departure_transition_ents.vmf" (that FourthReaper mentioned) in your map, which has a player start in it and will take care of everything automatically

-or-

  • make an empty room with a player start, a correctly configured portal gun and a trigger_auto that activates "@arrival_teleport".

Side note: I've hacked together my own version of the arrival_departure_transition_ents instance, which allows you to set the type of portal gun, title text and ending text / next map to load, all without extra entities or scripting. Should I upload that here? (I'm asking because I remember seeing a few modded versions in the DLDB already, which would make my upload redundant.)