How to make fake elevator? Created 1 week ago2024-04-27 09:06:34 UTC by D31V D31V

Created 1 week ago2024-04-27 09:06:34 UTC by D31V D31V

Posted 1 week ago2024-04-27 09:06:34 UTC Post #348755
I'm working on my Half-Life mod and i need to make elevator teleport you to the other one using multi_manager, how can i do it?
Posted 1 week ago2024-04-27 15:43:47 UTC Post #348756
Take a look at the trigger_teleport entity guide here: https://twhl.info/wiki/page/trigger_teleport

Note that it will be obvious to the player they they have been teleported, as a trigger_teleport can cover a wide area, but will only sent the player to a single spot, so they will appear to warp to a certain point inside the elevator.

I'm curious as to why you cannot simply use a regular elevator?
monster_urby monster_urbyGoldsourcerer
Posted 1 week ago2024-04-28 05:26:10 UTC Post #348758
The reason why it won't be a normal elevator is because it has doors.
Posted 1 week ago2024-04-29 05:29:58 UTC Post #348759
If this is a singleplayer campaign, you can fake the elevator just like how it's done in the HL1 campaign (e.g. the transition from c1ac1 to c1a2, the end of Unforeseen Consequences and start of Office Complex). This is probably the easiest solution.

Basically there's no moving elevator whatsoever. Just a room that looks like an elevator, a set of doors, and a button inside to trigger a trigger_changelevel.
After the level transition you're taken to an identical "elevator" room. An env_shake creates a rumbling and various ambient_generics creates noise, together creating the illusion of movement. Do this for a few seconds, then trigger a ambient_generic with a "ding!" sound and trigger the doors to open.
Add other details/effects to taste.
If it has to be within one level, then as Urby says a trigger_teleport has no relative offset in vanilla GoldSrc which would be very obvious and immersion-breaking. Additionally, to "toggle" a trigger_teleport you need to use a multisource master as trigger_teleport cannot be triggered on/off directly.

Another solution, which is a lot more complex than the others, is instead of using func_door for the doors you use func_train. Essentially 3 trains moving together to create the elevator.
This sort of setup needs careful timing and path_corner's Fire on Pass key can be of great help with that.
Posted 6 days ago2024-05-03 04:53:24 UTC Post #348765
I wrote a tutorial for this, but haven't published it because there's no screenshot yet. If you can work with text alone, here's a snippet:
Suppose two maps building_base and building_top. To setup the elevator, we first need two doors and two buttons. The buttons target the doors. Now, one of the doors will fire our changelevel upon closing but the other will target a multisource which we'll place near the button inside the elevator. Don't worry, we will put the list of entity specs in a bit.

Then we setup the functional level change setup. As with previous, we put our trigger_changelevel way up in the ceiling (or even hidden in a nook nearby, as long as the players can't reach it), an info_landmark in the middle of the elevator floor, and a trigger_transition covering the whole elevator interior. Note that the trigger_changelevel's change target will target a multi_manager that manages the elevator ride effect.

Finally we'll be placing a few atmospheric entities to create the sensation of riding an elevator. One ambient_generic for the starting and stopping sound, another for the travelling sound, and a third for the chime. An env_shake for the jolt. Lastly a multi_manager to manage them all.

The entity specs for the setup is as follows:
Door and button setup
  • Outside func_button:
    • Target: elev_door
    • Delay before reset: 4
  • Inside func_button:
    • Target: elev_door
    • Master: elev_lock
    • Delay before reset: 4
  • One of the func_door:
    • Name: elev_door
    • Fire on close: changelevel_elev_relay
    • Flags: ☑Toggle
  • The other func_door:
    • Name: elev_door
    • Target: elev_lock
    • Flags: ☑Toggle
  • The multisource:
    • Name: elev_lock
Changelevel setup
  • trigger_relay (to delay changelevel)
    • Name: changelevel_elev_relay
    • Target: changelevel_elev
    • Delay before trigger: 1
  • trigger_changelevel
    • Name: changelevel_elev
    • New map name: building_top
    • Landmark name: lm_elev
    • Change target: elev_ride_mm
    • Delay before change target: 1
    • Flag: ☑ USE only (2)
  • info_landmark
    • Name: lm_elev
  • trigger_transition
    • Name: lm_elev
Elevator ride setup
  • ambient_generic (the jolt sound)
    • Name: elev_jolt
    • WAV name: plats/talkstop1.wav
    • Flags: ☑Start silent, ☑Not toggled
  • ambient_generic (the moving sound)
    • Name: elev_move
    • WAV name: plats/elevmove2.wav
    • Flags: ☑Start silent, ☐Not toggled
  • ambient_generic (the chime sound)
    • Name: elev_chime
    • WAV name: plats/elevbell1.wav
    • Flags: ☑Start silent, ☑Not toggled
Elevator ride setup (continued)
  • env_shake (elevator jolt)
    • Name: elev_jolt
    • Amplitude: 2
    • Effect radius: 500
    • Duration: 1
    • 0.1=Jerk, 255.0=rumble: 1
  • multi_manager
    • Name: elev_ride_mm
    • elev_jolt = 1
    • elev_move = 1.5
    • elev_jolt#1 = 6
    • elev_move#1 = 6
    • elev_chime = 7
    • elev_door = 8
    • (Adjust delay as needed)
On the other map, the entire setup can be copy-pasted wholesale, with only the new map name of trigger_changelevel set to the first map (e.g. building_base) and everything should just work.
Posted 5 days ago2024-05-03 16:35:34 UTC Post #348766
If your elevator is part of a single level, I'd recommend looking into the example map below.
Note that this particular setup is meant to go to multiple levels; if your elevator only goes from A to B it won't have to be nearly as complex, and the part about changing path_corner targets can be ignored.
Loading embedded content: Vault Item #6717
You must be logged in to post a response.