Train / elevator to different floors each time?

Cyberen

L3: Member
Mar 30, 2021
143
30
Check out this map, I thought I could use AddOutput to move the tracktrain to whichever path_track I wanted by first setting the target, then moving the train, but it doesn't move at all. When they were linked 1-6 it just went to 6 and stopped. Any idea how I can make the tracktrain move (not teleport) to the level I want?
 

Attachments

  • elevatortest.vmf
    61.4 KB · Views: 38

Tiftid

the Embodiment of Scarlet Devil
aa
Sep 10, 2016
531
398
I quickly converted it to a whole other logic system, since I've never heard of using AddOutput to set the target of path_tracks, and heavily suspect that path_track neighbours are calculated on map load and can never be changed.
Here are some things I noticed along the way:
  • Train speed can NOT be set to "Linear Blend" - this will make it convert negative velocity to positive, making it impossible for the train to move backward
  • The "OnPressed elevator_position GetValue" output from the buttons MUST happen before the "OnPressed elevator_target SetValue" output - you can do this with a small delay, but in my case I found it was easy enough to do with order of output creation
Hope this helps!

All this reminded me of working on sd_offload's logic... good times!
1699488551175.png
 

Attachments

  • elevatortest_tiftidedit001.vmf
    67.9 KB · Views: 27

Cyberen

L3: Member
Mar 30, 2021
143
30
Thank you so much Tiftid, it works beautifully! Did you want to upload this to the prefabs section or should I, because I think it's a wonderfully useful system!