Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › When an entire team dies, restart.
8 posts, 3 people · 1,152 views Thread Rating: ★★★★★
closedWhen an entire team dies, restart.
Started by Wilson [29th ID] on 08-02-2006, 12:14 PM
Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
08-02-2006, 12:14 PM #1

Hey guys, I'm trying to find the most efficient way to run this realism mode plugin, and I'm hoping you can help.rnrnI'd like this plugin to determine when an entire team has died. If so, the opposite team makes a full capture of the flags.rnrnI have respawning disabled so people will actually stay dead, but I'd like it to act as if the other team made a full cap if the team is eliminated (the other team wins the round & it restarts)rnrnI figured the easiest way to do it would be on client_death or the death_message Message (to count suicides). The things I've tried simply don't work and I feel like there's a more precise way to do this that you guys could suggest.rnrn

Basically my theory was,rnOn death {rnget user's teamrncount how many players are alive on that teamrnif count is less than one, cap all the flags for the opposite teamrn}
rnrnBut how is the most efficient way to write that?

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
08-03-2006, 06:00 PM #2

Anyone know how to do this method?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
08-03-2006, 09:27 PM #3

hmm there might be some event called when a flag is capture.. you might be able to fake it and make the msgs yourself.. but im not sure..nni tried just creating a message for the RoundState and setting it to axis or allies hoping that changing that might force the round to end in that team's favor.. but it didnt do anything

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
08-04-2006, 05:45 AM #4
']n nBut how is the most efficient way to write that?
n nWrite a plugin that "hooks" the entity in every dod map called the info_doddetect and have the plugin "convert" the map from normal to "para" style, which is ultimately what you are after. It is a "style" of maps that has long since been forgotten in favor of infinite spawning. para_ maps are what we now call CS style maps. One life per round.... which is what you are looking to do with a plugin right ?n nWithout a plugin, BSPedit any map and you can make the "switch", and the good news is, you can run the hacked map on your server, and noone has to download anything !!!n nI can "convert" a few maps for you so you can see what I mean...

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
08-05-2006, 02:04 AM #5

Wow, that made my day. I'm very glad to see that style of gameplay is still possible.rnrnSo far this is what I've managed to change. I can now successfully disable respawning but how do I make it detect if an entire team is dead to restart the round like it did in the old para maps? Is there something else I need to add?rnrnFrom dod_kraftstoff:rn

{rn"origin" "432 768 88"rn"detect_wind_velocity_y" "0.0"rn"detect_wind_velocity_x" "0.0"rn"detect_axis_respawnfactor" "1.0"rn"detect_allies_respawnfactor" "1.0"rn"detect_points_timerexpired" "0"rn"detect_timer_team" "1"rn"detect_points_allieseliminated" "0"rn"detect_points_axiseliminated" "0"rn"detect_allies_paras" "1"rn"detect_cls_mortar" "1"rn"detect_axis_paras" "1"rn"detect_axis_infinite" "0"rn"detect_allies_infinite" "0"rn"classname" "info_doddetect"rn}
rnrnThe thing I changed was the detect_axis_infinite and detect_allies_infinite (to 0)

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
08-05-2006, 02:30 AM #6
']Wow, that made my day. I'm very glad to see that style of gameplay is still possible.n nSo far this is what I've managed to change. I can now successfully disable respawning but how do I make it detect if an entire team is dead to restart the round like it did in the old para maps? Is there something else I need to add?
n nI get my information from here, and my experience with making maps...nhttp://collective.valve-erc.com/index.php?ent=info_doddetect&game=dodn nThere are 2 more entity properties you should try manipulating...n ndetect_target_allieseliminated (string) Target when allies are eliminatedndetect_target_axiseliminated (string) Target when axis are eliminatednI am not sure if the "default" maps all use the same target name, BUT, what you could do is create your own end round entity from within the plugin, have the info_doddetect "target" one of these round end entities and "end" the round that way.... n nI will contact you on AIM and try to help with what I know about mapping, and entity programming...

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
08-05-2006, 08:11 PM #7

well on client death you could have it cycle thru all the players on the server, then have it check if the player is on the same team as the victim & is alive, if it returns no one as being alive then the whole team must be dead..

Wilson [29th ID]
started this thread
Posts: 623
Threads: 57
Joined: Oct 2005
08-05-2006, 11:15 PM #8

Diamond-optic - see above that is the theory that I had originally. I've discovered that I cannot do it the way dragon-reborn suggested because the dod dev team disabled the "detect_target_allieseliminated" bit a while ago.rnrnHow would be the best way to write that, diamond, if you wouldn't mind helping me? I tried but it was very messy and didn't work properly. For now I just need it to detect if the whole team is dead when the client dies and execute a console command (I'll figure out the flag cap thing later)

Archive › Old Forum Threads › Help › Scripting Help › When an entire team dies, restart.
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC