Post tutorial RSS Bad sequence of path_tracks - Double loop workaround

Here's the workaround I found to a crash rare issue with func_tracktrain, path_track and func_trackchange.

Posted by on - Advanced Mapping/Technical

While working on the first maps of 'On A Rail' I kept running into a crash issue where the game would freeze up once I came down the train elevator. I used the debug mode in Visual Studio to track down the issue and this lead me to the 'Bad sequence of path_tracks' error.

I verified that all the paths were in correct order and working. With a lot of tinkering I found that the issue is a combination of the usage of multiple looping paths with branches and the use of the func_trackchange. If I only took one of the loops out of the equasion it worked, and if I only removed the func_trackchange it was also fine. But together they somehow create an explosive mix.

Here's an overview of the pathing:

The train goes from the white circle onto the main loop (green arrows) There are 2 path_tracks where players can toggle the branch and direct the train (blue circles). Then there are 2 points where the train converges back onto the main loop (green and red circle).

The path that reconnected with the loop in the red circle seemed to cause the crash (in conjuncture with the func_trackchange). I found that connecting this path to the first path_track of the branch that leads to the next map (yellow arrows), seems to fix the issue.

If I kept it this way, the train would travel through the walls, which is a problem. So as a workaround, I added the correct path_track (c7a_p16) as the alternative branch path. This fools the func_trackchange into thinking that the loop is now fine and the crash is gone. The only thing you need to do now is put a trigger_once somewhere after the descend from the train elevator that triggers the problematic path_track (c7a_p43). Once this triggers, it'll toggle the path_track to the correct branch. Just make sure there is no way to trigger the path_track again.

This was a very unique and rare error, which will probably not happen to anyone else. However, it took me a long time to figure out and find this solution, so I thought I might as well dedicate this article to it :) Hope this helps someone out there in the future!

Comments
BloodyBody
BloodyBody - - 42 comments

Looking on this pathing I see no difference from the original game's path. Why does it work in original game and doesn't work for you?

Reply Good karma Bad karma+1 vote
Hezus Author
Hezus - - 563 comments

Because the original did not have the func_trackchange in the same BSP as the rest of the track.

Reply Good karma+1 vote
Guest
Guest - - 692,931 comments

I just ran into this same error today trying to make a Black Mesa map, except mine had only one loop and no branches and the train elevator would still crash the game. This article was extremely helpful. Thank you!

Reply Good karma Bad karma+2 votes
Hezus Author
Hezus - - 563 comments

Good to see this helped someone! It's a very rare issue but I was sure someone would eventually stuble across it as I did.

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.