Re: On death output for multiplayer
Posted by DrGlass on
Fri Aug 17th 2007 at 7:54am
DrGlass
member
1825 posts
632 snarkmarks
Registered:
Dec 12th 2004
Occupation: 2D/3D digital artist
Location: USA
I'm creating a knife map where I want a single CT and T to be teleported into an arena. I have the trigger_teleport toggle a func_wall_toggle that blocks the teleport so no one else can run through.
the question: How can I tag each player so that their death sends an output to the func_wall_toggle that corisponds to their team's teleporter?
I'm drawing a blank on this one.
Re: On death output for multiplayer
Posted by DrFrag on
Mon Aug 20th 2007 at 11:31am
Posted
2007-08-20 11:31am
62 posts
16 snarkmarks
Registered:
Jan 12th 2005
Location: Australia
I think this can be achieved with a filter_activator_team. I haven't used it before so I'm sorry I can't give more specific help.
Re: On death output for multiplayer
Posted by fishy on
Mon Aug 20th 2007 at 1:00pm
fishy
member
2623 posts
1476 snarkmarks
Registered:
Sep 7th 2003
Location: glasgow
if you can make trigger brushes to be team specific, then you could fill the arena with one for each team, and use the on start/end touch outputs to toggle the teleporters.
i eat paint
Re: On death output for multiplayer
Posted by Cash Car Star on
Mon Aug 20th 2007 at 9:05pm
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
I would recommend not using a func_wall_toggle. It's an entity
I try to avoid using on-camera as much as possible - it's much better
for simple scene changes that happen when players aren't looking (and
for floating, hidden easter eggs!). To avoid having two people
enter, use a func_multiple with a reset time triggering the teleport
which occupies the same airspace. First to touch goes through,
and then you can have a set up which seals off the teleport in a more
traditional means (func_door or something). It's complex, but you
could even use a master to enable/disable the func_multiple and then
there's no need to block it off at all (although a little light
displaying if the teleport is active could be nice).
I do not know how to trigger things on the player's death. I
don't know the HL2 entities well enough, and do not know what they can
do. I think maybe it would be fun to just set it up so a new
player can join the melee every 20-30 seconds or something. But
that doesn't solve the problem.
Re: On death output for multiplayer
Posted by DrFrag on
Thu Aug 23rd 2007 at 11:02pm
Posted
2007-08-23 11:02pm
62 posts
16 snarkmarks
Registered:
Jan 12th 2005
Location: Australia
Okay, I've done a test run with filter_activator_team and the concept is really simple. Needs several entites though. Adjust entity names, in quotes, as you see fit.
In your arena, make a trigger_multiple (named "playercounter") filling the whole area - we'll use this to count players. Make two filter_activator_team entities ("combineplus" and "combinesubtract") - these will filter player counts for combine and rebel players. Make a math_counter ("ccmath") and a logic_case ("cclogic") - these will manage the combine player counting. And of course math_counter ("rcmath") and logic_case ("rclogic") for the rebel counter maths. The VCD says func_wall_toggle is obsolete, so I'm going to use func_brush entities to block access to the teleporters (plus I don't know how to use func_wall_toggle). I'll assume these are named "combineaccess" and "rebelaccess", and that you've already got an Enable trigger set up to make them solid when the player enters the teleport.
In playercounter, make these outputs:
OnStartTouch, combineplus, TestActivator, , 0.00, No
OnEndTouch, combinesubtract, TestActivator, , 0.00, No
So when a player enters the playercounter entity, it'll pass control to the combineplus filter. When a player leaves (or dies), it'll pass control to the combinesubtract filter.
Combineplus should be set to Filter mode Allow, Filter Team Combine. Make this output:
OnPass, ccmath, Add, 1, 0.00, No
OnFail, rcmath, Add, 1, 0.00, No
So if it's a combine player that has entered, the ccmath counter gets incremented. If it's a rebel player, the rcmath counter gets incremented.
Combinesubtract should also be set to Filter mode Allow, Filter Team Combine. The outputs should be:
OnPass, ccmath, Subtract, 1, 0.00, No
OnFail, rcmath, Subtract, 1, 0.00, No
Same deal here - if the player leaving (or dying in) the entity is a combine, the ccmath counter drops by one. The rcmath counter drops by one if it's a rebel player.
Ccmath needs the following output:
OutValue, cclogic, InValue, , 0.00, No
This simply sends the current player counter it's holding to the cclogic logic_case entity.
Cclogic should have Case01 set to 0. Nothing else needs changing, we only care if there are 0 players left. Set the following outputs:
OnCase01, combineaccess, disable, , 0.00, No
This will turn off the solidity of the wall blocking combine access to their teleport.
Rcmath and rclogic are set up the same way. Rcmath outputs to rclogic, and rclogic turns off rebelaccess if a zero player count is triggered.
That should do it. I haven't tested this by the way, but I'm familiar with the entites used. Let me know if you run into any problems or need an example map built.
Oh, one problem that might come up. I suspect that player corpses also count as players. I'm not sure how this is handled in CSS since respawning is different to HL2DM. Worst case, maybe raise the player counter brush entity up a little so dead bodies fall below it.
If you you use Cash Car Star's recommendation of enabling/disabling the teleporter, note that if the teleporter gets turned on when two players are standing in the teleporter, they'll be fused together at the destination.
Good luck with your map. Sounds like a cool idea. :smile:
Re: On death output for multiplayer
Posted by DrGlass on
Sat Aug 25th 2007 at 3:39pm
DrGlass
member
1825 posts
632 snarkmarks
Registered:
Dec 12th 2004
Occupation: 2D/3D digital artist
Location: USA
Though I haven't tested this, it seems to work. I modified it to re-activate each team's teleport once the logic_case changes. While it appears to work, I don't quite get why the team's case01 would disable the teleport when it hits 0.
I'll be releasing the map later today.
Re: On death output for multiplayer
Posted by Cash Car Star on
Sat Aug 25th 2007 at 7:58pm
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
DrFrag: not if access to the teleporter is also blocked by a slightly less bizarre means. For example, a conventional door instead of a func_wall_toggle. Or have the teleporter within an alcove such that only one player can fit at a time. There's plenty of ways to avoid double teleportation.
Re: On death output for multiplayer
Posted by DrGlass on
Sun Aug 26th 2007 at 6:24am
DrGlass
member
1825 posts
632 snarkmarks
Registered:
Dec 12th 2004
Occupation: 2D/3D digital artist
Location: USA
Yeah, the teleport can only fit one person at a time and it is only deep enough for one person to touch.
Also I've had to add a few things. Another logic_case to activate and reset the dropping floor.
ka_glass is in the map forum so I'll tell you how well all this worked when I get it tested with a number of people.