Setting Custom Outputs for Entities

CaffeinePowered

L1: Registered
Jan 19, 2008
27
0
I'm trying to set up a system on a map that I'm working on where when a team captures a point it will lock that point for a certain number of seconds making it uncapturable during that time.

The map Im working on cp_starship is laid out in a non-linear fashion.

The points go 1 - 3 - 1, of the three middle points a team only needs to control 2 to unlock the enemy's home point and only that point is needed to win, its sort of like a cross between desert_fortress and steel.

All the middle points are capturable from the get go because I set the 'Red/Blu Previous Point Required' to the home point. I tried using triggers to disable the point and the capture area around it, but that didn't work.

What I need to do is somehow make the trigger set the 'Red/Blu Previous Point Required' to something else, then have a delay of X Seconds then fire another trigger to set it back. I know how to get the triggers to fire and everything, I just can't figure out how to set that value on the point.

Any help or guidance would be greatly appreciated.
 

Laz

L420: High Member
Jul 5, 2008
461
35
you can put delays on outputs. the cap point entity, you set an output oncap whatever team, target itself with a disable, then add another output that is the same as the other one, only to enable, and put a delay of x seconds on that output. if that is how locking/unlocking cap points work anyways.
 

CaffeinePowered

L1: Registered
Jan 19, 2008
27
0
you can put delays on outputs. the cap point entity, you set an output oncap whatever team, target itself with a disable, then add another output that is the same as the other one, only to enable, and put a delay of x seconds on that output. if that is how locking/unlocking cap points work anyways.

This works, however, it does not change the icon on the HUD to indicate the point is 'locked', and will not help me.

If the point doesn't show itself as locked, players that don't know about it being locked are going to go to the point anyway.

Since the map I am designing is non-linear I am trying to dynamically lock points to force action around those that are open and also to force one team to go on the defensive if they don't capture 2 of the 3 middle points.

The only way that I can think of to make the HUD icon change is to alter the 'Previous Point Needed For Capture', but this isn't one of the options when doing an output, so I'm curious if there is some 'custom' way I can do this.
 

CaffeinePowered

L1: Registered
Jan 19, 2008
27
0
Would trigger_capture_area's SetTeamCanCap do what you want?

Also, if you want to change the "Previous Point Required" during gameplay, you could use the AddOutput input.

Ill test 'Can Cap' tomorrow, I don't remember seeing that in the possible output list. If anyone knows any good tutorials on using AddOutput I'd love to see one since I figured that might be the way to go., but I haven't the faintest idea how to use it.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
Ill test 'Can Cap' tomorrow, I don't remember seeing that in the possible output list. If anyone knows any good tutorials on using AddOutput I'd love to see one since I figured that might be the way to go., but I haven't the faintest idea how to use it.

SetTeamCanCap would be on the trigger_capture_area, not on the team_control_point.

AddOutput can be used to add an output to an entity or to directly set a keyvalue.
AddOutput <key> <value>
So if you wanted to set the secondary point that BLU must own to a point named "cp_d", your parameter would be:
AddOutput team_previouspoint_3_1 cp_d

Another possible solution would be to use control points with the "model hidden" and "hide in HUD" flags checked. These could be the required previous points for the visible CPs. The invisible points could then be sent SetOwner inputs to lock/unlock their associated points.
 

CaffeinePowered

L1: Registered
Jan 19, 2008
27
0
Hmm....I tried this and still nothing, heres what I have for my add output

OnCapTeam1 bridge_control_point AddOutput team_previouspoint_1_2 red_home_point 0

OnCapTeam1 bridge_control_point AddOutput team_previouspoint_1_2 blue_home_point 60


OnCapTeam1 bridge_control_point AddOutput team_previouspoint_1_1 blue_home_point 0

OnCapTeam1 bridge_control_point AddOutput team_previouspoint_1_1 red_home_point 60