quick Train/Elevator question

I’m actually using alien swarm sdk but i figure garrysmod is the same thing, and facepunch has a lot of helpful mappers ;)\

I’m wondering how i can make my train only move when there is a person in the trigger that is parented to my train. I can make it move but i can’t make it stop when someone is not on the train anymore.

trigger_multiple

use outputs as OnStartTouch to start the elevator, OnEndTouchAll to stop/reverse it

A trigger_multiple that locks/unlocks a func_button/logic_relay or something.

Or use game_zone_player, which is kinda cool too:

Next time, post your quick questions in the Megathread.

Why so complex iostream? Just do what Dj said and have the trigger multiple start and stop the train/elevator.

Depends on the desired functionality. I wouldn’t want an elevator that start and stops automatically when one players enters or leaves a specific volume.
Plus, advanced entity systems are cool :v:

I made a complex multi-floor elevator using heaps of entity scripting, which resulted in a good elevator. I was going to use an elevator which the player needed to stand on to activate, but theres problems associated: Unless the elevator is just a func_door, having it activated by the player’s presence is a problem if they die while the elevator is moving through an awkward place.
Consider that, and maybe you’ll find that it’s better if you use buttons.
And set a trigger to unlock the buttons when the player is present, and lock them when theyr’e gone, like iostream said…