Need help with capture the flag!

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

Duck-Joke

L1: Registered
Feb 11, 2016
40
2
I'm making a CTF/SD like gamemode to my map, where there is one intelligence (a bomb), and whoever gets it first, attacks the other teams base. I need some kind of safe or something, like in doomsday, where you have to open a rocket. I have made one, that is triggered with a func_flagdectectionzone brush, but if i change the team, nothing changes!! The red team can now open their own base, so the blu team can cap it really quick. Is there a way i can detect a flag, that a specific team is holding?

BTW sry if this is complicated..
 

Luigi1000

L2: Junior Member
Dec 12, 2015
65
14
When I checked last (which honestly was a few seconds ago), the func_flagdetectionzone has a team keyvalue which you can set to detect which team is in the volume. Two of them set to one team each with some proper I/O setup should be able to get you what you want.
 

wiseguy149

Emperor of Entities and Amateur of Aesthetics
May 12, 2009
103
220
Try a func_flag_alert instead. If I recall correctly, flag detection zones only look at the flag, not the player, so if you have a single neutral flag like in SD, they won't be able to tell who's carrying it. Flag alerts, however, have different outputs for a carrier on each team.
 

Duck-Joke

L1: Registered
Feb 11, 2016
40
2
Try a func_flag_alert instead. If I recall correctly, flag detection zones only look at the flag, not the player, so if you have a single neutral flag like in SD, they won't be able to tell who's carrying it. Flag alerts, however, have different outputs for a carrier on each team.
But i also need an output that tells when the team isn't holding the flag. But there's only two options: ontriggeredbyteam1 and ontriggeredbyteam2. There's no 'onNotTriggeredbyteam1' or 'onNotTriggeredbyteam2'. Is there then any logic that can invert it?
 

wiseguy149

Emperor of Entities and Amateur of Aesthetics
May 12, 2009
103
220
Nope. func_flag_alerts will not detect players not holding the flag.

However, you could achieve similar results by having a trigger_multiple with a team filter that's simply meant to detect players of a certain team, and have a flag detection zone enable/disable it or its outputs. That way you would detect any players on a given team, but not while a flag is present.
 
Last edited: