In Half-Life you can't connect two entities. The tram and the door are one func_tracktrain entity. Only at the end, when the tram stops, a level change occurs to a map where the the tram door is a separate func_door entity. You can't attach a func_door entity to another moving entity like func_tracktrain. You can use func_rotating or anything else, but you have to do it the way Valve did it.