Can't get func_trackchange to work Created 5 years ago2019-01-23 13:53:30 UTC by UbOh UbOh

Created 5 years ago2019-01-23 13:53:30 UTC by UbOh UbOh

Posted 5 years ago2019-01-23 13:53:30 UTC Post #341798
I'm making a map where a train follows a looped track with a func_trackchange in it. I want the func_trackchange to go down with the train and return to top before the train comes back. But I can't even move it. "tp11" and "tp12" path_tracks are aligned in the top view. What am I doing wrong?
https://i.imgur.com/Rn2tdKF.pnghttps://i.imgur.com/Rn2tdKF.png
Posted 5 years ago2019-01-23 18:57:42 UTC Post #341808
IIRC when I used a func_trackchange, I had to trigger it with something, like a path_track:
User posted image
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 years ago2019-01-24 09:28:19 UTC Post #341817
I tried both with a path_track and a func_button. It gives this "rail stop" sound without moving every time I trigger it. After triggering the train becomes immobile like it's waiting the func_trackchange to finish it's movement.
I triggered it without the train on it too. Same result.
Posted 5 years ago2019-01-24 10:58:18 UTC Post #341818
im going to be lazy but get bsp2map or winbspc and decompile a valve map and see how its done
Posted 5 years ago2019-01-24 11:49:06 UTC Post #341819
A Sven Co-op map called crisis2 has a track change that can be moved freely without affecting the train. Maybe see how that's done?
Posted 5 years ago2019-01-24 13:31:17 UTC Post #341821
I give up. I made the entity system exaclty like in c2a2 (top path_track's next target is a non-existing entity, both top and bottom path_tracks fire the func_trackchange on dead end through a multi_manager) with only difference being train speed, shape and func_trackchange's spin amount, travel altitude. It has an origin brush too so that can't be it.
Posted 5 years ago2019-01-24 13:48:51 UTC Post #341823
The track change can only be moved if the train is either on it or far enough away.

Specifically, if the train's current path_track is the path_track that the track change is currently using, or the next or previous path_track connected to that one then you can only move the track change without the train being on it if it's 150 + train length units from the track change's origin, not taking into consideration the Z position of the track change.

So if you want to trigger it, make sure there are path_track entities right at the edges of the track change that the track change path_track entities connect with, that way the track change is only blocked if the train is very close to the track change (if the train is moving to one of the path_track entities at the edge). You'll want to position these so that the train can come to a stop without floating in the air or clipping through the track change when it moves.

If you want to make it possible to trigger the track change as much as possible, place another set of path_track entities right after the edge path_track entities so that the track change's logic doesn't see how close the train is until it's right at the track change. They could be as close as a unit apart, or maybe on top of each-other but that could cause problems with the train's direction.

crisis2 does it this way IIRC.
Posted 5 years ago2019-01-24 14:35:13 UTC Post #341824
I understand this as that if the train is already on the top track waiting to descend there shouldn't be any problem, right? But it doesn't move that way too.

Anyway, I just tried copying only that entity system without any unrelated things to a completely new map. And it worked without any tweaking :O. Did I hit some kind of limit? Or there is another entity in the map blocks func_trackchange's path.

I deleted anything that moves and/or near the func_trackchange. And deleted all the func_waters too. Still can't move it. Put a path_track 1 unit away from both top and bottom tracks like you said. Instead of moving, it set off some nearby tripmines :O. It seems I have to either delete the func_trackchange or delete everything but the func_trackchange.

I'm trying to fix this thing for almost 3 months and I'm tired of it. I can upload the map if anyone wants to take look.
Posted 5 years ago2019-01-27 15:30:18 UTC Post #341858
Upload it. I would take a look.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 years ago2019-02-02 11:49:50 UTC Post #341922
Sorry, I already removed it and replaced it with a spiral tunnel.
You must be logged in to post a response.