Capture point while holding intel?

  • If you're asking a question make sure to set the thread type to be a question!

UziMonkey

L1: Registered
Jul 24, 2009
8
0
I'm designing a map that requires something perhaps a bit unusual. There's a single intelligence in the middle, and a capture point at both bases. The objective is to take the intelligence and bring it to your capture point. The capture point is only enabled while the intel is being held on the point. It's kind of like CTF, but you have to defend the intel while the point is being capped.

I've looked at the KTF tutorial and example map, and it's not quite the same. There, the point gets capped as long as someone is holding the intel, and that's not what I wanted to do.

So how can I enable a capture point only if the intel is being held on it by the correct team? I've tried a few things, including one method that sets the !activator's name, and using a filter_activator_name. I'm not sure if I even got close, but it looked to me like it set the intel's name or something, not the player that grabbed the intel. I think I'm trying to run before I can crawl here, because I'm really lost.

Will this even work? I haven't even begun to think about the victory conditions yet. If it won't, I'll have to rethink.

I'm new to mapping. I'm not having much trouble with the brush stuff, but the entity stuff is giving me trouble. I'm continuing on the map anyway, making it a normal CTF for the time being.
 

zornor

L4: Comfortable Member
Jan 14, 2009
195
23
From what I've read from a rather recent thread, triggers don't work on the flag. Instead, try a... i think it was a point_proximity_sensor (point entity) or whatever on the cp. When the flag gets near, trigger the capture point to enable.
 

UziMonkey

L1: Registered
Jul 24, 2009
8
0
OK, I've got it now.

There's a control point, with a trigger_control_point that starts disabled. Around the trigger_control_point is a trigger_multiple whose filter is a filter_multi. The filter_multi has two filters, a filter_activator_name for FlagCarrier and a filter_tfteam for Red. When a red player carrying the flag is at this brush, the control point is enabled. When a red player without the flag, or a blue player with or without the flag is here, the control point is not enabled.

Now, there's a trigger_multi whose parent is the flag. OnStartTouch it will !activator AddOutput settargetname FlagCarrier and OnEndTouch it will !activator AddOutput settargetname NotFlagCarrier.

As for as I can tell this will work without any major problems.
 

UziMonkey

L1: Registered
Jul 24, 2009
8
0
Also, here's a VMF. Can someone take a look at this and see if I've done anything really wrong?
 

Mexican Apple Thief

L3: Junior Member<br>LEAD FARMER
Aug 23, 2008
345
60
So technically you need to have the flag there but as long as you do anyone can help cap?

So you can still have a four man capture rate?
 

UziMonkey

L1: Registered
Jul 24, 2009
8
0
That's right. Not sure if that's what I really want, I'll figure that out later.

I've now added a capture zone (duh, how could I forget that?) that gets enabled as soon as the capture point is taken. Now when you capture and hold the flag, it gets capped. Once capped, the capture zone is disabled and the capture point is reset.

One of the final problems I'm having now is that, since this is technically a CTF map, there's no hud that displays the capture progress. Is there any way I can add this to the CTF hud or display something in-game?
 

Mexican Apple Thief

L3: Junior Member<br>LEAD FARMER
Aug 23, 2008
345
60
That's right. Not sure if that's what I really want, I'll figure that out later.

I've now added a capture zone (duh, how could I forget that?) that gets enabled as soon as the capture point is taken. Now when you capture and hold the flag, it gets capped. Once capped, the capture zone is disabled and the capture point is reset.

One of the final problems I'm having now is that, since this is technically a CTF map, there's no hud that displays the capture progress. Is there any way I can add this to the CTF hud or display something in-game?

Don't think so, but given a choice between a ctf HUD and CP, go with CTF for the pointer. You could try to implement text that shows how captured it is so far, and you could make a progress bar that's visible in the world.
 

UziMonkey

L1: Registered
Jul 24, 2009
8
0
Yes, I need the CTF hud both for the pointer and for the capture count. Knowing the score is more important than knowing how far along the capture is.

I'm continuing anyway, I don't think this is a very large issue.