PL tracktrain Questions

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Hello all, Hoping to find some info to use in my newest map:

I searched a bit and could not find the answer so here I post...

I am creating a payload map. I have created my func_tracktrain and have objects that move along with it. When I run the map I can ride on the tracktrain brush no problem, but other prop_dynamics that are on top of that brush give me issues. For example a crate. If I jump on top of the crate I don't move with the tracktrain anymore. I am idle and the crate passes under me until I fall off onto the tracktrain. 2nd issue if I jump in front of the moving crate, instead of it pushing me it passes through me and I am stuck until it goes all the way through. I have surrounded the crates with clip brushes and the same thing happens. If I just walk in front of the crate this doesn't happen, only when I jump.

Also anyone know any tricks to allow building on a moving prop_dynamic or the tracktrain itself?

Thanks for any suggestions/help!

-Bobby
 

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Ok, so the search here is a bit touchy, I had searched for tracktrain and only found a few threads. Now I have searched for func_tracktrain and have a whole forumload to read.

If anyone cares to still point me in the right direction that would be great. I will continue to read through the posts.

Thanks,

-Bobby
 

Spacemonkeynz

L5: Dapper Member
Jan 31, 2008
234
52
When making my map, I found problem when the collision mesh of the model came into contact with the player, either when the player stand on top of it (he doesn't move with it) or in front of it (then he gets stuck)

What I did was make the functrain (which is textured with playerclip) larger then the model, thus the player only comes into contact with the playerclip.

If you don't want to make the func_tracktrain larger, you can disable collisions on the model, but remember to put a solid brush (i.e. invisible) inside the cart to block bullets.

If you using lots of boxes and stuff, just switch all collisions to off, and build up the solid parts of the cart with invisible and playerclip brushes.
 
Dec 25, 2007
566
439
If you using lots of boxes and stuff, just switch all collisions to off, and build up the solid parts of the cart with invisible and playerclip brushes.
Dont forget that the func_tracktrain can be made of multiple brushes; so you can have all these solid parts of the cart part of the func_tracktrain.
 

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Dont forget that the func_tracktrain can be made of multiple brushes; so you can have all these solid parts of the cart part of the func_tracktrain.

Could you possibly elaborate on this? I created other brushes for the func_tracktrain and put them above the crates and I still could not move with the train. I did parent them to the original train so they move with it but they don't "carry" players. How do I need to tie those together?

I will try the no collision method, that sounds like it will fix the "getting stuck" problem.

Also a note on building, from my research it seems this was possible before Goldrush was released. I remember building teleporters on top of the train in Well. I also remember when Goldrush first came out you had to "walk" on top of the bomb to ride it. They must have changed the coding for func_tracktrain shortly after because you can ride it now without walking.

Big thanks to both of you for your help!

-Bobby
 
Dec 25, 2007
566
439
Select all the brushes together, and then tie them to a single func_tracktrain entity.
 

Altaco

L420: High Member
Jul 3, 2008
484
120
Yeah, and as a side note, that can be done with any brush entity, for example, if you wanted to make a T-shaped capture area for a control point, you could use 2 brushes and tie them to one entity.
 

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Thank you everyone for the information and explanations!! All makes perfect sense.

Oh I am so excited to go home this afternoon. That was the only hurdle I had in the functionality of my map.

Other then building on the tracktrain or a moving prop_dynamic, but if thats not possible then hopefully players wont expect to be able to do it.

Thanks again!!!

-Bobby
 

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
Hum, aside from the initial question, I've an issue that I can't tackle.

My payload is composed of a func_track_train, a model with no collisions activated and an invisible func_brush. It does push players, block bullets as expected. But when it turns, players might get "trapped" into the cart and blocked within the payload until another turn let them flee. I tried with track_train larger than the brush and vice versa but it keeps having this weird behavior
 
Last edited:

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Get rid of the func brush, turn collisions back on, make the brush that will be your func_tracktrain bigger then the model (multiple brushes if necessary) and texture it with Clip or Player Clip (I have yet to find the difference). Then tie it to func_tracktrain

The Clip brush will keep players from getting stuck in the model and once tied to func_tracktrain players will be able to ride on it. I actually didn't play with the no collisions option as making the clip brush bigger then the model fixed that. The smallest things will cause it to, the little nails sticking out of crates was causing my problem.

Hope that helps,

-Bobby
 
Last edited:

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
I just looked as the way it was done in pl_heights, and noted that the mapper did'nt use a perfect box for its track_train but vertical sides softly bending inward. Tried it but it did'nt turn as efficient. Problem seems to arise into the smallest curves (128 -90° turn) with too fast train rotation. (I use orientation change near path track btw). I'll investigate on my path precision and with a bigger track_train
 

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
Okay, I found the solution : team_train_watcher prevents people from colliding directly with the train and getting stuck upon a collision error.

Of course since I can't use the watcher I'm quite upset about this.
 

Spacemonkeynz

L5: Dapper Member
Jan 31, 2008
234
52
Okay, I found the solution : team_train_watcher prevents people from colliding directly with the train and getting stuck upon a collision error.

Are you sure, I don't think so.

The 'team_train_watcher' is just the entity that takes care of the HUD and makes the cart go backwards, doesn't have any effect of the mechanics of the cart.
 

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
It manages the backward movement, and the stopping on capture blocked behavior. Moreover, I tried pushing against the cart in motion (staying in front of it and trying to move into it) Into a regular payload map (I tried on pl_dbheights) you feel a "jerkiness" because the physical engine push you outside each time you try to "enter" the cart in motion, a repusive force sends you away.

I my setup without any watcher, it did'nt work this way. On straight parts of the path, I was gently pushed in a continuous way. Fine but, when the cart rotates, there are times when you can be "slide" into the cart and find yourself trapped until another roation let you free (it may not happen). Upon adding a watcher, I recognised the same feeling than on dbheights. So far, I'm trying to emulate this behavior with some trigger_push. A larger one which pushes you gently and a narrower one just against the train designed to push stronger. People don't stay against the exact front of train at any instant and trapping is avoided.

Of course it should be asked to valve, but still, the backward and blocking commands on their owns shouldn't be tied to a such rigid HUD element.
 

Spacemonkeynz

L5: Dapper Member
Jan 31, 2008
234
52
They 'capture blocking' is controlled by the capture area, which sends the amount of players to your math_remap/logic_case/func_tracktrain. It doesn't use the 'team_train_watcher'.

The move backwards is sent from the 'team_train_watcher' only because it has a built in timer, but it doesn't need to be, you could set up your own timer to tell the cart to move backwards.

I made es_cave (es for Escort) before Goldrush came out, as well as a few other people who made es maps. Those maps didn't use a team_train_watcher.
 

Spacemonkeynz

L5: Dapper Member
Jan 31, 2008
234
52
Another problem I had with my map is bits of geometry blocking the players, even a 1 unit hight bump in the ground will cause the player to stop moving and the cart will pass through him. Sometimes you might need to playerclip the floor if it's a bit to rough.

Have you decompiled goldrush, have a look at their setup. A 'trigger_push' shouldn't be necessary.
 

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
I looked many times at the the decompiled versions of goldrush and db_heights. I also tried simply pasting their entities into my map. Of course the recompiled version of dbheights worked as intended. The floor is almost flat in most locations and many collision issues happened in totally flat part of the track (no collision with tracks or whatever). Problems arise when the cart turns (I broke the curves in many many sub paths in case they where too sharp, but neither goldrush nor dbhieghts seem to suffer from this). Unsufficient tick rate may cause the collision to be "missed" when the block rotates.

I had people complaining of being unable to block the cart with the classic OnNumbCappersChanged output. It deserves further investigation but obviously it would require assistance and a special setup to check for the exact output sent. If the watcher doesn't play any role it should be expected from the capture area to set NumbCappers to zero when capture is blocked... but is this true ? Furthermore, I used another trigger to halt cart progression so it didn't bother me anymore.

This evening, I'll try some experiments with and without train watcher to see if it modifies physical behavior of the track_train. I've jumped to this conclusion because it is really the unique difference in my map (I tried with dynamic and physical entities for the cart itself, but it doesn't matter since collisions with player are disabled).
 
Last edited:

Uriak

L8: Fancy Shmancy Member
Apr 27, 2008
543
70
Okay so I ran a series of tests

same custom map, two carts, flat terrain, same entites setup with a nodraw textured train_track, and unblockable by player flag.

Without watcher I was always able to enter the cart at one point or another. Always on curves, sometimes very diffult to achieve (no trigger added, but cart is not a single box but is cut to present less sharp angles). When turning, the cart push me to keep contact with its surface (obviously not when collision fails)

With a watcher added in map (disabled at start and whether it points at this track_train or another), I was never able to slide into the moving cart (tried four times). Into sharp curves and from time to time, the cart repels me quite violently (jerkiness felt) mostly when its orientation changes.

To be sure I also recompiled db_heights (which I tried before without issues) and removed all watchers from it (essentially turning it into a CP map). And... I managed to enter the cart in sharp curves.

So my suspicion remains that the watcher sets the game in payload mode and that in this mode the game collision prediction may have been upgraded to avoid stallings. Of course this is just an hypothesis. Collision may be avoided without it (I really forced to enter the cart) with gentle curves, flat ground surface and appropriately cut track_train brush.

If someone else could do the same experiment as me (compiling pl maps with and without watchers and trying to enter the cart while it moves - by moving toward its front for instance) it may settle this question.
 

Spacemonkeynz

L5: Dapper Member
Jan 31, 2008
234
52
hmm, that is weird, i'll test it too.

Maybe your right, the presence of the 'team_train_watcher' might set the game mode to payload (which it does, because the payload instructions are shown at map start)

It's possible it affects the collisions as well, interesting.
 
Oct 6, 2008
1,947
445
hi, posting this here cause it seems to fall into the same area (or at least in my head)

- I understand how not to get stuck inside the payload now :) thanks to this post

but do have this other question as the payload pushes you around the map.

I've notices that there are spots in my map where the payload will push you into a worldbrush and you can get stuck there.

For these areas would you put in a noclip brush - would that stop it from happening? I keep getting stuck in a corner.

Has anyone else had this problems and can you put down how you fixed it?