Path_tracks and func_tracktrain

M

Murlock

Guest
Hi all, I used to be an active member on the old VERC forums, now im back into hammer editing after a very long break. And surprise surprise Im having some troubles and i would love some help. So here it is:

Im trying to replicate the tube system seen in portal that carries companion cubes a long it. I've built the tube system with the same tubes used in portal now comes the point in figuring how to actually get the tube flowing. At the end of the day, i want the player to be able to ENTER objects into the tubes and have them be carried a long.

I've made some progress and due to the bending nature of my tube system I have decided to use Path_Track entities. But Im having some trouble. I have 4 path_track entities labeled pathnode1 to 4. And a func_tracktrain parented to my object. (using a companion cube for testing) I've set the tubes as non-solid for now to eliminate any physics problems for the moment.

I have flaged tracknode1 (the first path_track) to Disabled in the hope that the tracktrain will not snap to the path at the start. But it does. I have a trigger with the output OnStartTouch - tracknode1 - EnablePath so when the player approches the tracktrain, it should "in theory" snap to the path and start on its journey.

So what am i doing wrong? I've tried starting with tracknode1 with DisableTrain ticked. but same result.

So in essence, when the level starts the tracktrain (with its parented props_physics_overide) is already on the position of pathnode1 and is stationary. How can I get it so the tracktrain is disabled at the start of the map and trigger it to enable on a trigger?

Thanks in advance. If you want anymore details just ask. Would really love the help. Im really stumped as func_tracktrain doesnt have a Disabled flag.
 
hmm i would gladly help but with some explanation of the problem it's sometime hard to find out.. can you make an example map which is the same as yours? and a little explanation about what should happen (in steps so a bit roughly :p) I can check it and see whats wrong.
 
Hey, thanks mate, but yesturday I got some really great help and managed to sort it. Feels like a wasted post now, so i feel abit silly. But thank you very much anyway.
 
oh well :) no problem, good luck with your map ^^
 
For the record, trains ALWAYS spawn @ their first track. To have a train spawn somewhere else you make the first path_track somwhere else. Then for the second path_track (which will look as the first) - you check the "Teleport to this path_track" flag.
 
For the record, trains ALWAYS spawn @ their first track. To have a train spawn somewhere else you make the first path_track somwhere else. Then for the second path_track (which will look as the first) - you check the "Teleport to this path_track" flag.
cough..

Hey, thanks mate, but yesturday I got some really great help and managed to sort it. Feels like a wasted post now, so i feel abit silly. But thank you very much anyway.

you wont have to reply on something thats figured out..
 
cough..

you wont have to reply on something thats figured out..

I didn't reply to help him specifically. But I hate it when I have a problem like this and I find threads like this one where the person who asks the question says "nevermind I solved it" and then doesn't give the answer.

So my answer is to anyone who might stumble upon this thread later - unlikeley as it may seem. That's why it starts with the words "For the record..."

//Unarmed
 
So my answer is to anyone who might stumble upon this thread later - unlikeley as it may seem. That's why it starts with the words "For the record..."

//Unarmed
Hear, hear.
 
I didn't reply to help him specifically. But I hate it when I have a problem like this and I find threads like this one where the person who asks the question says "nevermind I solved it" and then doesn't give the answer.

So my answer is to anyone who might stumble upon this thread later - unlikeley as it may seem. That's why it starts with the words "For the record..."

//Unarmed
true true :p

//Takes back what he said.
 
Very good point. I shall give you the solution I found.

In order to have a movable object join a path this is how i did it.

Func_traintrack will always spawn at the first path_track, thats right. So to get around that. I used a phys_constraint, a info_target and filter_activater_name entities. And here's how.


Now put the info_target parented to the func_tracktrain.
Put the object name (the object should be a prop_physics) as the filter name property for the filter_activater_name.
Place a phys_constraint right infront of the first path_track (like 1 or two units) make sure they dont overlap more than the back end of the constraint or it will bug. Now Entity 1 should be set as the prop_physics name and Entity 2 as the func_tracktrain.
Put a tigger_teleport just behind or on top of the first path_track. Put the filter name set to the filter_activater_name you made before. Then put the remote destination as the info_target you parented to the tracktrain. In the triggers flags, tick physics objects and make sure all the others are clear. In the outputs on start touch. start forward. set the speed and turn the phys_constraint on. (make sure the phys_constraint flags have the Do not connect until turned on ticked.)

And there you go. thats how i did it. I hope that helped. Sorry i didnt post the solution before, I thought i was just being a noob and you guys would already know.
 
thanks for the info :)

nah we might know how to fix this kind of thing but some other guys that are looking for this aren't known how to fix it.. thats what he ment ^^
 
Hey, im back. hopefully with a slightly easier but related problem!

I need the path to work over and over again every time the cube triggers it. So the first problem is I need the func_tracktrain to be at the starting point once it's completed the path. As there is no output or parameter (at least that i can find) to teleport or reset to the first path_track.
I have tried some work-arounds, but no joy. it keeps bugging out. At the moment I have the final path_track Next Stop set to another path_track that sits just in-front of the first path_track. This Path_track that sits just infront of the start, has the flag "disable train". So when the cube triggers the train to start, it should start moving from the first path_track. But what it actually does is teleport the cube to a random point along the track, and completely bug out, shaking like mad and follows the path way off the origin.

So idealy I need to find a way to set the func_tracktrain to the first path_track once it reaches the final path_track and wait there until it triggers again.

thank you again for any help, i'll be working on this problem solidly. So if i come up with a fix before you guys let me know how to make a proper loop that will stop every time It reaches the first path_track. I shall post the solution again.
 
Ok the solution is:
Kill the phys_constraint at the end of the path when you want the cube to detach. and on the trigger teleport at the start of the level. using a point_template. ForceSpawn the constraint. this will make the path reusable.
 
Back
Top