CoD, Search & Destroy gametype


(Flippy) #1

Would this be possible to do?

For those who don’t know what CoD or search & destroy is:

It’s a gametype in the game Call of Duty, where each player has only one life. Get killed and the round is over for you. A typical round takes 3 minutes.
If all players of one team are dead, the other team wins obviously.
There are 2 objectives that must be blown up by Allies. Blowing either one will win them the round.

All the above things can probably be easily done by mapping (using the LMS gametype with only one life). (In LMS, when all axis are dead, allies win right? What about time-limit reached and not everyone dead? what happens then?)

And now the catch: When the dynamite allied planted is defused by axis, axis wins the round instantly. No waiting for roundtime to end, defuse once, and you win.

I’ve been thinking about doing this without using a mod… and i concluded that it MIGHT be possible, although im gonna need some help :stuck_out_tongue:

I think you can have the game “check” how many dynamites have been planted at an objective? (accum 0 set_to_dynamitecount <targetname>)

Well i thought about making a scriptblock in the game_manager run every second, and make it check if accum 0 = 1. like this maybe:


trigger loop
{
wait 1000
trigger self loop
accum 0 abort_if_equal 0
   trigger self dynamite_planted
}

This way, “dynamite_planted” gets run only when one or more dynamite has been planted at

Then, let the scriptblock “dynamite_planted” do the same loop, but have it check if accum 0 is 0 again. If this is true, then make the axis win the map.:


trigger dynamite_planted
{
wait 1000
trigger self dynamite_planted
accum 0 abort_if_not_equal 0
   trigger self axis_win
}

Well, when i write it down like this it seems to be able to work! But i haven’t got time to test this this week… i just wanted to share this with you and ask for advice or anything… am i missing something? I hope not, i love S&D :smiley:

EDIT: Oh also, i forgot one thing…

when the dynamite has been planted, the time stops. So planting in the last second is not too late.
But this can be done by making the roundtime longer as soon as “trigger dynamite_planted” has been run? I’ve seen roundtimes getting longer… i think in temple?

EDIT 2:

OMFG forget everything i said… i just saw this:

EVENTS:

defused
Called when a stick of dynamite is defused inside a trigger_objective_info entity.
Note: The TOI must target a func_constructible, for this event to be called.

dynamited
Called when a stick of dynamite is armed inside a trigger_objective_info entity.
Note: The TOI must target a func_constructible, for this event to be called.

Thanks to chruker’s site! :stuck_out_tongue:
That will make it easier LOL

btw in the table following these “statements” on chruker’s site it says the entity that can call these events is a “target_objective_info” should this be trigger_objective_info, or is this another entity that’s not with the editor by default? :stuck_out_tongue:


(Chruker) #2

btw in the table following these “statements” on chruker’s site it says the entity that can call these events is a “target_objective_info” should this be trigger_objective_info, or is this another entity that’s not with the editor by default?

Thats ofcause the trigger_objective_info. I have corrected that now. Strange that nobody else has mentioned it. Maybe the website has degraded since it was uploaded :slight_smile:

Anyhoot, I don’t have anything usefull to say about the issue. Sorry :slight_smile:


(nUllSkillZ) #3

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7917
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7918

I think there’s another post in which is described how to check if players of one team are alive.
Can’t find it right now.
Not sure if it’s necessary because you can use LMS or limited lives.
Also etpub has the ability for sudden death (means: if dynamite is planted in the last second the game continues untill dynamite is defused or explodes).

Not exactly sure ATM about the two events dynamited and defused.
One belongs to the func_explosive and one to the TOI as far as I remember (haven’t re-read the thread).

Edit:

Just found it:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=10056

Not sure if all works as expected.
Use at own risk.


(=PoW= Kernel 2.6.5) #4

Chruker has just about the best sites out there because he gives you necessary reference material.
Tutorials are great but they don’t tell you things like maximum entities or all the good scripting stuff.

Thanks Chruker.

Flippy - have you looked at the True Combat:Elite mod for ET?
It pretty much already does what you want in an environment where players are accustomed to that style of gameplay.

I play TC:E fairly frequently.


(Flippy) #5

thanks nullskillz, i’ve read the threads and they say it works there :slight_smile: (defused and dynamited triggers)

your concept for checking if there are allied players left is cool and easy to do also… the trigger_multiple brush covers the whole map ofcourse? it doesnt mention that in the post…

ill be trying to get this working today…but ill doubt ill have the time to finish it

Oh and yes kernel, chruker’s site rocks :clap:

Edit:

I’ve just started trying it, and i was wondering something about Firefly’s post in one of your links:

“maindoor1” is obviously the scriptname of the TOI and the func_explosive… what is “maindoor1_trig” then?! the scriptname of…?!


(Flippy) #6

ok, it was easier than i thought…

i made a little test map, when you plant dynamite and it blows, allies win, when axis defuse, axis win…

the script is very easy:

game_manager
{
	spawn
	{
		wm_allied_respawntime 1
		wm_axis_respawntime 1
	}

	trigger axis_win
	{
		wm_setwinner 0
		wait 500
		wm_endround
	}

	trigger allies_win
	{
		wm_setwinner 1
		wait 500
		wm_endround
	}
}

obj1
{
	spawn
	{
		wait 300
		constructible_class 3
	}

	death
	{
		wm_announce "Objective 1 destroyed! Allies win!"
		trigger game_manager allies_win
	}

	defused
	{
		wm_announce "Objective 1 dynamite defused! Axis win!"
		trigger game_manager axis_win
	}
}

obj2
{
	spawn
	{
		wait 300
		constructible_class 3
	}

	death
	{
		wm_announce "Objective 2 destroyed! Allies win!"
		trigger game_manager allies_win
	}

	defused
	{
		wm_announce "Objective 2 dynamite defused! Axis win!"
		trigger game_manager axis_win
	}
}

Turns out i didnt need “dynamited” at all :stuck_out_tongue:

But now a different problem…
i tried the test map in LMS and suddenly i could destroy the objectives by shooting :S
can’t you have dynamitable objectives in LMS? that sux…
guess i need nullskillz’s way to check if players are alive… and probably make the spawntime higher than the round time

And then there is another problem… with making the spawntime higher than the round time…

in ETpro, after the warmup the spawntime is randomized… the actual time stays the same ofcourse (30 for axis in most maps) But it STARTS randomly the first time… so if you would start the map axis would sometimes have only 5 seconds left to respawn, sometimes 15, etc…
this is ofcourse a problem if i make the spawntime higher than the roundtime to prevent respawning! With a bit of luck axis can respawn before the time is over due to this random thingy… fuck ^^ guess no ETPro for this map…


(nUllSkillZ) #7

I think it’s easier to achieve with LMS gamemods.
Problem: None of the servers are playing LMS.
So I thought about the trigger_multiple.
There have to be to of them (for each team one) I guess.
And they have to be mapwide.

You only need dynamited if you want something to be triggered at this event.
Only thing you need in addition is to keep track of how many dynamites are planted at each of the objectives.
And of course how many of them got defused.


(Flippy) #8

well i got around the LMS gametype…

when you spawn, you spawn in a little room, with a teleporter, which teleports you to the “arena”. 500 ms later the teleporter is disabled and when you respawn you’re “stuck” in the room, with a message telling you to go spectator please, or wait untill the end of the round.

About keeping track of how many dynamites have been planted… hmm that’s true, but i need the trigger dynamited event for that? So how is that one used? in which scriptblock?

oh, i can use accum 0 set_to_dynamitecount ofcourse for that :slight_smile: will try it


(Flippy) #9

Well, i think i got S&D working now :slight_smile:

I used NullSkillz’s script to check if players are still alive to simulate a LMS gametype, only now with objectives.

Planting a dynamite at either objective and letting it blow will make Allies win.
Planting multiple dynamites at either objective and letting it blow will also make Allies win.
Defusing a planted dynamite will make Axis win instantly.
Defusing multiple planted dynamites will make Axis win instantly.
Killing all Allied players will make Axis win.
Killing all Axis players will make Allies win.

That’s about it…

the only catch here is that if you join the map after the warmup, you cannot spawn anymore… well, you can spawn but you’ll spawn in a closed off room.
On a server with a low warmup, players with slower connection speed (like me :clap: ) will not be able to play…

One way to get around this would be to do it like in CoD. When a team wins the round ends, it waits a bit, and restarts the round, with the winning team having one point. After 6 rounds the team with the most points wins and the map changes…

I see no way to do this however, as the objectives that are destroyed cannot come back?


(nUllSkillZ) #10

You can use high spawn times to avoid respawn.

You could use multiple func explosives at the same place.
If one gets destroyed you could set the state of the other one to default.


(=PoW= Kernel 2.6.5) #11

Flippy,

Where did that quote from FireFly come form?
I think I see his problem.


(Flippy) #12

@=PoW= Kernel 2.6.5,

it came from a link in NullSkillz’s post… but don’t bother, they already found his problem there, i just quoted this particular post because it had both maindoor1 and maindoor1_trig in the script :slight_smile:

@Nullskillz:

As i said, with high respawntimes you won’t avoid people being able to respawn, because the FIRST (and only the first) respawn time is different. It CAN be the time you set it to, but it’s randomly decided how long left for the first respawn.
The reason behind this is ofcourse that you have to go and see the enemy spawn to get their spawntime. Otherwise it would always be 30 - 00 in the case of axis or 00-20-40 in the case of allies…

And about multiple TOI’s, that’s an idea ofcourse… ill look into it.