Hud for a cp+pl hybrid map.

Vlad

L1: Registered
Dec 31, 2017
2
0
So, I am currently working on a map where Blu firstly has to capture a point for then a payload cart to come to that point to then be pushed all the way to the end.
My problem is that, on my first try, the hud with the capture point did not show at all, but after I captured it the payload hud appered.
On my second try I tried to add a tf_gamerules entity to force the cp hud, and it worked! But now also the payload points showed up.

My question is: how could I make it so in the first phase of the map the hud displays only the control point, and then have it switch to the payload hud?
 

Ælement

Comfortably mediocre
aa
Dec 21, 2010
1,481
1,616
I very much doubt this will work, but try to set the hud type to CP in the tf_gamerules. Then use this output in the control point for swapping to PL hud:

eyA1g1T.png
 

Vlad

L1: Registered
Dec 31, 2017
2
0
Nope, does not seem to work, the hud type remains the same(cp), tried every single variation of hud_type 3
 

Egan

aa
Feb 14, 2010
1,375
1,721
I don't think anyone has done it before.

You could look into trying to experiment with the team_control_point_master 's SetCapLayout input, which takes in a string of CP indexes exactly like the keyvalue of 'Cap Layout'. Maybe in combination with the unique trick of having a custom blank CP icon (which you would have to create) for the 'neutral' owner icon on the CP entity, and the team_control_point 's SetOwner (with team index 0 = neutral, 2 = red, 3 = blue).

Like maybe you could initially set the owner of all the payload track CPs to 0, with the blank CP icons, hiding them. And only displaying the CP icon of the initial unlocking-CP. And then when that turns to Blue's ownership (when blue captures the first point), blue's CP icon is blank so it becomes hidden, and then you reconfigure the Cap Layout and set the PL track CP ownerships to Red... I'm not sure though, it could look really dumb, and it might generally not work at all! You'd be on your own testing this, I couldn't offer more help.

Unless someone else knows other ways of making this work! :p
 

tyler

aa
Sep 11, 2013
5,102
4,621
I do not think there is a way to have both CP and PL huds at once because of the way the payload hud works.

If you want a workaround, pl_cranetop sort of does this. "Capturing" the point really just moves the cart along the normal payload hud until it gets to the landing zone so BLU can push it. It's a very old map, but you can download it here. The final point, in the 3rd stage, basically does the opposite. Decompiling the map to see how it works would probably be useful.
 
Last edited: