Complicated- sequential trigger points that each player can trigger only once?

(s2a) yahodahan

L3: Member
Apr 22, 2009
144
18
Hello!! A fairly complicated one here (or seems so to me, anywho) :p

I want to make a silly little "race track" idea, essentially track and field/cross country- with shotguns, rocket launchers, and more :D hurray!

Well, I think it has promise.

I think I have most of it figured out, but what I would really appreciate advice on is how to set up a system of sequentially captured points that each player can capture one after another, but only once per player.

So far, my idea is to have the players run around the track, and have "check points" staged along the path that they run through. At each check point, the player gains a point, and also the next check point is then unlocked. Also, players would always re-spawn back at the point they last unlocked, and spawn time would be instant, to keep things insane-o. :)

Finally, the player who finishes first wins (woooo), whether their dead or alive body bounces through the final checkpoint.

I intend to accomplish the "win" by giving a point for each checkpoint, so if their are 10 checkpoints, the first to 10 points wins.

Alternativly, it could be team based, ie whichever team gets ALL team members across the finish line first, is the winner (epic struggle of the nOObs at the end!! yayy!)


Thanks all!!!! :woot:
 

Apom

L6: Sharp Member
Sep 14, 2008
366
65
Your question has a simple answer: player-based is impossible, and team-based is not possible in the way you ask (unless you know in advance how many player each team will have).

Also, Vigilante has a valid point...
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Entirely possible. Except for the dead thing. And a single player "victory". But at first pondering I say it's entirely possible as far as sequential check points per-player, spawn based on check point and first team with all members across the finish.
Not terribly in the mood to type it all out right now, however.
 

Apom

L6: Sharp Member
Sep 14, 2008
366
65
But at first pondering I say it's entirely possible as far as sequential check points per-player
...
and first team with all members across the finish.
Oh well, I gave a try to something similar some time ago and eventually found it impossible. I'm waiting for the correction :thumbup1:

spawn based on check point
Team-based, absolutely. Player-based, no way.
 

Zeewier

L9: Fashionable Member
Sep 20, 2008
619
262
You can do everything if you write a plugin ;)

The only way I know to make players unique is this:

Trigger:
OnTrigger -> AddOutput -> !activator -> targetname <name>

then with filter_activator_name (in combination with filter_multi for multiple names that can (not) activate the trigger/capture area) you can filter players out that already triggered the trigger.

But this only works if you must capture the points in a set order (because you can only set 1 name)

CP1 can be capped by players without a name (on trigger set the target name to CP1)
CP2 can be capped by players only when they their name is CP1 (they have capped/triggerd CP1) (and sets name to CP2)
CPX can be capped by players with CP1 or CP2 as targetname (use the or in filter_multi for both filters)
ect.

For the teleporting: Give the teleporter a filter_activator_name ;) (note: maybe names are reset after you died, but i'm not sure about this)

Capping as a body: Maybe when a player turns into a ragdoll it still has the same target name.

But maybe ABS has a better solution...
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Z33 pretty much has it. You use AddOutput to sequentially name players and filter the check point triggers accordingly. Then you surround the initial spawns with trigger_teleports filtered to the various check point names, causing you to "spawn" further ahead. They do in fact maintain the name after respawning, and even while dead but the "player" exists wherever their spec cam is, not on their dead body, I'm pretty sure there is no reliable way to mark ragdolls.
It's pretty much identical to how the spawning system works I built for Artesia's map (where is that guy anyway D: )

For checking if everyone is at the end you'd need to have a trigger_multiple for each team covering the length of the "track", and run a TouchTest every time someone crossed the finish line and then have NotTouching trigger the win if it finds no one. The only problem with this is I don't think dead players would be counted, so it would be every living person has to cross the line... which could lead to one person crossing and everyone else suiciding, but I'm not seeing that kind of cooperation from random people :p
 

Apom

L6: Sharp Member
Sep 14, 2008
366
65
While I appreciate the solution provided for naming players, I'd like to point out the foreseeable problems due to only having two possible CP owners (RED and BLU), while you'd need one per player. While this may be alleviated by not using actual CPs at all (only triggers), this will be a problem when it comes to HUD displays.

For checking if everyone is at the end you'd need to have a trigger_multiple for each team covering the length of the "track", and run a TouchTest every time someone crossed the finish line and then have NotTouching trigger the win if it finds no one. The only problem with this is I don't think dead players would be counted, so it would be every living person has to cross the line... which could lead to one person crossing and everyone else suiciding, but I'm not seeing that kind of cooperation from random people :p
Yes, that's the problem I ran across a few months ago. Essentially dead players will screw your trigger logic, and while your example is indeed unlikely to happen, you could very well have five players behind the line and three dead ones.
 

Zeewier

L9: Fashionable Member
Sep 20, 2008
619
262
They do in fact maintain the name after respawning, and even while dead but the "player" exists wherever their spec cam is, not on their dead body, I'm pretty sure there is no reliable way to mark ragdolls.

I'm pretty sure the camera follows the ragdoll (but not gibs)
 

(s2a) yahodahan

L3: Member
Apr 22, 2009
144
18
WOW, guys/gals, thank you so much for the really in-depth reply. I bow to your expertise and knowledge!!

Really, glad to hear ABS says it is possible, and thank you for the roadmap to it! (pun somewhat intended...)

I won't have a lot of time to make this happen for the moment, but will be posting more as I go, and questions certainly will come up... :p

Thanks again!