Payload Turntable?

Impulse

L2: Junior Member
Nov 1, 2009
51
18
I have been attempting to make an element for the new payload contest and am having difficulty doing so.

The basic idea is that once the cart reaches the turntable it will automatically move forward to the middle and rotate 180 degrees slowly allowing the players to battle around it for roughly a minuet. I am having trouble coming up with a method to rotate the func_tracktrain with the model (which is parented to a rotating door). I was wondering if anyone had input on a method to do this effectively? I have tried several methods and have come up with nothing but errors or failures.

Problem solved!
 
Last edited:

Impulse

L2: Junior Member
Nov 1, 2009
51
18
Sorry i forgot to zip the vmf, i want to do something similar to barnblitz but have the cart rotate on the turntable not just the turntable rotate in front of the cart. I have looked at that specific vmf for the turntable however it does not modify the cart's movement at all, its just a normal path across once the table rotates.
 

Terwonick

L6: Sharp Member
Aug 25, 2010
278
190
I think if you just delay the cart's progress, while it turns, then have a path_track leading off in the other direction, it **might** work, have you tried that yet?
 

Impulse

L2: Junior Member
Nov 1, 2009
51
18
No it doesn't work, doing a 180 on path tracks gives bad velocity errors and it doesn't rotate the func_tracktrain with it, it would be possible to do it simply like this if i was able to disable collisions on the tracktrain, which i should double check if it's possible to do. Other than rotating the tracktrain properly all i have to do is parent the model to the door and it should work.

It appears that there is a "passable" flag so ill see what I can do with this enabled...
 
Last edited:

English Mobster

L6: Sharp Member
Jul 10, 2011
355
299
What I would do is use path tracks facing every 10 degrees or so, with "use this path_track's angles" checked. Then I would parent the turntable to the actual cart, having the cart move the turntable, not the other way around.
I have no idea if that'll work, but it's an idea.
 

Impulse

L2: Junior Member
Nov 1, 2009
51
18
That method didn't work all that well because the table was not as smooth as my other method. My method works perfectly but it creates several "bad bad setlocalangularvelocity (x,y,z)" errors that I don't know how to fix other than have the tracktrain turn around with several path tracks, but it looks weird on the spectator camera inside the cart because the model is then separated from it... so i need to figure out a way to turn the cart around on a dime. I was thinking teleporting it, but would that create issues with the trainwatcher?


Just got it working how i intended :) thank you for the help everyone!
 
Last edited:

Kiddnils

L3: Member
Sep 2, 2011
140
224
^
I try to do something similar and would be really happy if you post your solution.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
Have a path_track in the center of the turntable. When it gets there, make it activate the (I'm assuming the turntable is a rotating door) to open. Also, at the same time, disable the path_tracks in front and behind the cart won't move.
Also parent the track_train to the rotating door.

Make the door have OnFullyOpen > track_train > clearparent. Also enable the forward path tracks (not the behind ones), and you should be good to go.

That's how I'd attempt it. No idea if it'd work.

So:

path_track_in_the_middle > OnPass > track_train > SetParent > turntable
path_track_in_the_middle > OnPass > behind_path_tracks > Disable
path_track_in_the_middle > OnPass > infront_path_tracks > Disable

turntable > OnFullyOpen > track_train > ClearParent
turntable > OnFullyOpen > infront_path_tracks > enable
 

Impulse

L2: Junior Member
Nov 1, 2009
51
18
That actually will not work because it actually moves all of the path tracks around with it, and it also sometimes will create the same "bad setlocalangularvelocity (x,y,z)" errors that were occurring earlier during the rotation. What I have at the moment is not 100% yet but it will work for an alpha in me opinion. Here is a step by step guide to my setup right now.

The Cart:
- First setup the payload system just as you normally would (I used ABS' "sspl" system as a reference but you can directly copy his system over) Afterwards you need to make some small modifications to the cart.
- To do this ungroup the cart and make another brush the same size as the func_tracktrain (this is the nodraw brush overlapping the model) and make it a func_brush with the nodraw texture, give it a name such as sspl_collisions, and disable the two shadows, and then make it always solid as well as parented to the func_tracktreain (sspl_train).
- After this go back to the func_tracktrain and then check the flag "passable"
- At this time modify the phys_constraint (above the cart model) and change sspl_train to sspl_collisions
- At this time change the parents from sspl_train to sspl_collisions for the rest of the cart other than the func_brush, func_tracktrain, and trigger_capture_area.
- On the team_train_watcher change the value "allow the train to recede?" to NO (this is a temporary fix and can be removed if you have the cart enter the table automatically)

The Turntable:
- Make a func_door_rotating and give it a name, such as sspl_turntable.
- Disable its shadows, make it stay open by setting "delay before reset" = -1, set the "distance" to 180, and finally change the speed to what you feel you want (I will use 3, but you can change this at any time)
- Place a model (prop_dynamic) where the origins (centers) are right above each-other and parent the prop_dynamic to sspl_turntable.
- Disable the shadows. (and if it is a train track most likely collisions also)

Path Tracks:
- For what I am doing you will need 5 path tracks:
1. One moving the cart onto the turntable (we will call this A*).
2. One above the origin (center) of the turntable (Called B*).
3. One along the same line roughly eight units past the last one (Called C*).
4. One at the same location as B (Called D*).
5. Finally one at the same location as A (Called E*).
- In the map's logic auto make 2 new outputs:
1. OnMapSpawn / C / DisablePath / / 0.00 / NO
2. OnMapSpawn / E / DisablePath / / 0.00 / NO
- On path_track B add the following four outputs:
1. OnPass / sspl_pushzone / disable / / 0.00 / NO
2. OnPass / sspl_collisions / SetParent / sspl_turntable / 0.25 / NO
3. OnPass / sspl_turntable / open / / 0.50 / NO
4. OnPass / sspl_train / TeleportToPathTrack / D / 0.50 / NO
- On sspl_rotator add the following outputs
1. OnFullyOpen / sspl_collisions / SetParent / sspl_train / 0.25 / NO
2. OnFullyOpen / sspl_pushzone / Enable / / 0.50 / NO
3. OnFullyOpen / E / EnablePath / / 0.50 / NO

This is what I can remember doing because I don't have my desktop available right now but this should be it.

* You can name these anything you want but it's easier to assign a letter for the purposes of this tutorial.