Help With func_tracktrain Moving Platforms

BiggieMike

L1: Registered
Apr 8, 2023
4
1
I had an idea with a KOTH map where depending on who controlled the point, a platform would rise on their respective side. I've gotten the platform to move how I want, took forever, but my problem is having the game determine when to lower the non-point holder platform, and when neither owns the point.

Please feel free to ask further questions.
 

Attachments

  • hammerq1.png
    hammerq1.png
    1.6 MB · Views: 38
  • hammerq2.png
    hammerq2.png
    632.2 KB · Views: 33

GigaBite

L2: Junior Member
Jan 28, 2022
70
7
Hey,
I think there is an output that you can add to the "team_control_point" entity where once the control point is captured, it will fire an output based on which team captured the point. This output is "OnOwnerChangedToTeam(1/2)".
I assume that you want the new owner's point to raise on the capture, and the loser's point to lower, so here's what I think will do that:
If Red team captures the point, you could have 2 outputs: first, one to raise the platform for the Red team, and a second one to lower to platform for the Blue team. If Blue team's platform is already low, then in this situation, the output will do nothing, which is fine.
Do the same thing vica versa for when the Blue team captures the point, and that should result in the new owner's point being raised and the old loser's point being lowered.
As for the logic to handle when neither team owns the point, I don't think you would have to do anything. Just leave the platforms at the bottom to begin with and when the capture point is neutral, no outputs will be firing. Only after the points are captured will the platforms begin raising and lowering.

I hope I understood what you're trying to do properly.
Here's a link to the Valve Developer Community page explaining this entity: https://developer.valvesoftware.com/wiki/Team_control_point#Outputs

I hope this helps. I haven't tried this for myself in hammer.