timelimit_hit


(Loffy) #21

the flag is not returned once it is stolen, taken to home base and thus captured. The team gets an increased score yes, but the flag… it’s gone.

This sounds odd perhaps, but it’s a fact.
Some might say "How about ctf_silly? Well, it has 1 team_ctf_redflag in the red base. It has a key/value of count/3. It spits out 3 red flags. (An accum keeps count, and when 3 captures are made, the game is over.)
But in this case, the second flag is spawned immediately when the first is stolen. (As in, for example, Gold Rush.) It is then possible for the allies to carry two flags at the same time.

I’ll try to make a map where the allies can steal/capture one flag at a time.

// L.


(G0-Gerbil) #22

Yeah I know, hence why I suggested you setstate invisible the flag pickup as soon as a flag is collected so no-one else can pick up another, until the flag is either delivered or returned, at which point you setstate default the flag pickup again. Should work very simply.


(Loffy) #23

What do you mean by flag pick up? Do you mean the entity team_ctf_redflag/_blueflag? Yes that would work like a Swiss clock but a team_ctf_redflag/_blueflag cannot have a targetname. (If it is given a targetname, it will not show up in game.)
Therefore cannot setstate invisible or default.
Annoying indeed!
// Loffy


(Drakir) #24

Drakir wrote:
Also found out the hardway that u cannot use both “Scriptname” and “Targetname” on a team_CTF_blueflag/redflag.

Sock wrote:
Yep, that one surprised me too. It certainly does not make any sense as all other entities can cope with a “targetname” key. Its a strange codey thing …

Sock

From an earlier discussion about team_CTF_xxxflag!
http://www.splashdamage.com/forums/viewtopic.php?t=5766

In other words…to be able to setstate u need to have a targetname on the entity, in this case it doesnt work on the team_CTF_xxxflag for some unknown reason.


(G0-Gerbil) #25

Har, my stick has got so many wrong ends it’s not true :slight_smile:
Either that or it’s a moebius stick and I’m destined never to properly get it…

Anyway, ok, well, if you are prepared to go the script_mover uncover etc route, how about if you simply cover the flag (say with a set of bars) when a flag has been picked up, and release it that way?

Or… using the new entity defs, and this one is soooo unlikely to work it’s not true, use a single flag only, and once it’s delivered use the spawn_item thingy entity to spawn a new flag to collect at the same location :slight_smile:


(Fusen) #26

and quake3, <3 Q3 CTF


Babi Mac


(Loffy) #27

… cover the flag (say with a set of bars) when a flag has been picked up, and release it that way?

Im not sure what you mean. What I’ll do is (And this is alphatested and it works): Cover flag 2-9 individually, script_movers. Each flag in its own little box. They are visible from the outside thru bars. Flag 1 though is out, in the open, at match start. When flag 1 is captured, flag 2 is revealed, etc.

Or… using the new entity defs, and this one is soooo unlikely to work it’s not true, use a single flag only, and once it’s delivered use the spawn_item thingy entity to spawn a new flag to collect at the same location :slight_smile:

That IS a new approach! Must try this weekend. Thanks!

// L.


(Loffy) #28

Hi again.
It seems to me that the “timelimit_hit” command, that Drakir talked about above and that is featured in the SD map script for Oasis (one of my favorite SD maps), only works when setwinner is either 0 or 1.
I tried the command for the ctf map that futura and I are working on, and it did not work. We have setwinner -1 (no winner at full time). When time is up, and the game clock reaches 0.00, the command doesn’t run. We’ve tried with setwinner 0 and 1, and then it runs.
We have a ctf map were the objective is to catch 7 flags. In theory, this can cause problems on public servers: Suppose we have two teams that are equally good (crappy?)on a public server. After midnight. No admins around. The “vote for next map” is turned off on the server. The map will just run and run the whole night, because no team is ably to score 7 caps.

The plan was to have “timelimit_hit” run a script that would determine the winner (most caps at that time) and end the game.

We should also mention that the map comes with a scoreboard made of script_movers. Whenever a team captures a flag, the scoreboard changes. So at any given time, the scoreboard will show, for example, Axis: 1; Allies: 3.

One solution is to have setwinner 0 (or 1), because it works, unlike setwinner -1, and still use the timelimit_hit script to determine the winner. We’ll place the ending camera view so that the scoreboard is visible. All players can see the scoreboard (Axis: 1; Allies: 3.) and the answer to the question who won is obvious, hopefully.

The problem is: Suppose we use setwinner 0 (axis) and the allies have scored best, at the end of the game. Then there will be a confusion, since the games ending screen shows “Axis win” and plays the axis-win music, at the same time as all players can see the in game score board, which states, for example Axis: 1; Allies: 3.

Well, we’re still working on this. Eventually, the map (Darji) will be released.

// futura and Loffy


(Chruker) #29

If you do a ‘setwinner 0’ as the default, can you then - if the allies are the true winner - do a ‘setwinner 1’ in the timelimit_hit function to change the endgame screen?


(Loffy) #30

Yes, that is one of the things that we are trying atm.
Just finished a cool scoreboard just for the ending camera.
One of the worries is this: The map ends up on a large 24x24 server, with all players XP:ed out to the max (panzers recharge fast), and a team of XP collectors guarding their respective flags. We’re toying around with different repspawn points also atm, to weaken the defence at each base. What’s the point of having a bunch of flags if noone can get to them :slight_smile:

// f & L


(G0-Gerbil) #31

Why not update the wm_setwinner as you go?
whenever there’s a cap, if it makes axis win, mark them as so, vica versa for allies.
If the cap makes the score level, how about you set the winner according to has just cap’ed? (they had the most recent capture, so they get the amazing ‘you win’ text’.
Or… much more complicated:

Have a team score, stored in each accum.
Each second, a timer calls a script that adds to each team’s score an amount equal to the number of flags captured they control.
Then you use this score to determine who is the winner in the event of a tie for caps (Ie use it to set the wm_setwinner). Obviously it’s over-ridden as soon as one team has more flags than the other, but it’d be a useful and accurate way of calculating who was the ‘better’ team in the event of a tie, since the winner is then the team that’s had the most flags for longest over the duration of the map.
It also prevents the annoying trick that I’ve used in the fun forest map for RTCW - whereby you simply sit next to the most obscure flag you can find, and then when time runs out, you cap it to win the game.

What you’d need for the above is:

in game_manager:

spawn
{

globalaccum 1 set 0
globalaccum 2 set 0

}

trigger setflagwinner
{
trigger self setaxiswinner
trigger self setallieswinner
trigger self setequalwinner
}

trigger setaxiswinner
{
globalaccum 1 abort_if_less_than 1
wm_setwinner 0 //axis I think!
}

trigger setallieswinner
{
globalaccum 1 abort_if_greater_than -1
wm_setwinner 1 //allies I think!
}

trigger setequalwinner
{
globalaccum 1 abort_if_not_equal 0
trigger self setequalaxiswinner
trigger self setequalallieswinner
}

trigger setequalaxiswinner
{
globalaccum 2 abort_if_less_than 1
wm_setwinner 0 //axis I think!
}

trigger setequalallieswinner
{
globalaccum 2 abort_if_greater_than -1
wm_setwinner 1 //allies I think!
}

in your flags:

axis_capture
{

globalaccum 1 inc 1
trigger game_manager setflagwinner

}

allies_capture
{

globalaccum 1 inc -1
trigger game_manager setflagwinner

}

then you need a func_timer pointing to a target_script_trigger, with scriptname of ‘flag_counter’ and target of ‘tick’, and:

flag_counter
{
trigger tick
{
globalaccum 1 trigger_if_equal -7 flag_counter dec7
globalaccum 1 trigger_if_equal -6 flag_counter dec6
globalaccum 1 trigger_if_equal -5 flag_counter dec5
globalaccum 1 trigger_if_equal -4 flag_counter dec4
globalaccum 1 trigger_if_equal -3 flag_counter dec3
globalaccum 1 trigger_if_equal -2 flag_counter dec2
globalaccum 1 trigger_if_equal -1 flag_counter dec1
globalaccum 1 trigger_if_equal 1 flag_counter inc1
globalaccum 1 trigger_if_equal 2 flag_counter inc2
globalaccum 1 trigger_if_equal 3 flag_counter inc3
globalaccum 1 trigger_if_equal 4 flag_counter inc4
globalaccum 1 trigger_if_equal 5 flag_counter inc5
globalaccum 1 trigger_if_equal 6 flag_counter inc6
globalaccum 1 trigger_if_equal 7 flag_counter inc7
}
trigger dec7
{
globalaccum 2 inc -7
}
trigger dec6
{
globalaccum 2 inc -6
}
trigger dec5
{
globalaccum 2 inc -5
}
trigger dec4
{
globalaccum 2 inc -4
}
trigger dec3
{
globalaccum 2 inc -3
}
trigger dec2
{
globalaccum 2 inc -2
}
trigger dec1
{
globalaccum 2 inc -1
}
trigger inc1
{
globalaccum 2 inc 1
}
trigger inc2
{
globalaccum 2 inc 2
}
trigger inc3
{
globalaccum 2 inc 3
}
trigger inc4
{
globalaccum 2 inc 4
}
trigger inc5
{
globalaccum 2 inc 5
}
trigger inc6
{
globalaccum 2 inc 6
}
trigger inc7
{
globalaccum 2 inc 7
}
}

Note the above is simply typed straight out and untested, but should give you the idea.
If needs be I could test it out I suppose.
There are now only 2 conveivable problem scenarios:

  1. Neither team ever makes a capture. Might be an empty map (so no problem with result), or REALLY shit teams. Either way, I wouldn’t worry unduly - I’d probably just set a wm_setwinner in the game_manager spawn function and be done with it.
  2. Equal number of flags at time up AND equal ‘flag points’ (the score tallied in globalaccum 2). If this is the case then I’d probably simply leave the winner as is (Ie do nothing, which the script above should do).

So all in all, a long-winded way of providing a winner should the flag count be equal, but also I feel a fair one. Remember - the above only kicks in if the flag count is equal.

Hmm that ended up being a longer post than I’d intended - hope it helps! :smiley:


(Loffy) #32

Hi G!
I’ll read your post (it will take some time :slight_smile: , and get back!)
See you in a while!
Thanks!
// Loffy


(Marko) #33

ermmm I’ve done something with it on my citadel map:
http://mapdesign.free.fr/demos/et_citadel.htm

You could have a look at that script. In that map, I decided (since I can’t make draws) not to set the winner command to 0 or 1 in order to have the match go on until one team gets the 5 flags. When the time is over, the game goes on until one team eventually wins. This could lead to never ending games but it seems to run fine since and cov ops are the key to win that kind of game :slight_smile:
Gerbil’s idea of updating the winner as flags are captured is cool too but you’d have a problem when time limit is hit and both teams have the same amount of flags. :moo:


(Loffy) #34

Hi friends!
Thanks for your ideas and suggestions.
Yesterday, we sat 6 hours with the map and the script. It works like this now:
a) First to 7 caps wins.
b) If timelimit is hit (no team has 7 caps) the team with the highest number of caps wins. So, if the score is Axis 1, Allies 3, the allies will win.
c) If timelimit is hit, and the teams have an equal score (e.g. 0-0, 3-3 or 6-6), the game goes on. It goes on and it is “sudden death” (first cap will secure the win for that team).

Hopefully, the last point c) will not be too much trouble, on public servers.

A variation on c) above, is to award the win to the team that made the very first cap in the game. (It was Gerbil’s post above, which made us think about this design.) When timelimit is hit, the win goes to the team that made the first cap. (However, this will not work if the score is 0-0.)

The map, Darji, is small and you can steal the flag and cap in less than 2 minutes. There are a total of 6 routes back and forth between the bases: 5 ordinary ones (hallways and corridors) and 1 teleporter.
But, although it is small, it has a “big” feeling. There are large, open areas and many hallways. As a player, the first time you enter the map, you should fly around in spectator mode for a long time to really learn the map. “Oh, that is bad!”, some will say. But map knowledge is as important a skill as fragging! At least that’s what mappers believe
:slight_smile:

// futura & Loffy


(G0-Gerbil) #35

Gerbil’s idea of updating the winner as flags are captured is cool too but you’d have a problem when time limit is hit and both teams have the same amount of flags.

You kind of missed my point that my idea above is designed specifically to cater for the scenario where both teams have the same number of flags - because obviously there’s no problem if one team has more flags than the above :slight_smile:

Loffy- your idea was nice in it’s simplicity - just to get things straight I am guessing you are doing something like:

in game_manager:
spawn
{

globalaccum 1 set 0 // Flag for whether sudden death mode is on
globalaccum 2 set 0 // Running tally of flags capture
wm_setwinner -1 // Neither team wins

}

trigger axiswinend
{
wm_setwinner 0 // Marks axis as won?
wm_endround // End round
resetscript
}

trigger allieswinend
{
wm_setwinner 1 // Marks allies as won?
wm_endround // End round
resetscript
}

then when axis captures a flag, you (say) add 1 to globalaccum 2, and when allies capture a flag you take 1 away from globalaccum 2.
Then in your timelimit_hit you have:

timelimit_hit
{
globalaccum 1 set 1 // Mark sudden death as now on
trigger game_manager axiswin
trigger game_manager allieswin
}

trigger axiswin
{
globalaccum 2 abort_if_less_than 1
trigger game_manager axiswinend
}

trigger allieswin
{
globalaccum 2 abort_if_less_than 1
trigger game_manager allieswinend
}

then in your flag captures:

axis_capture
{
globalaccum 1 trigger_if_equal game_manager axiswinend
globaaccum 2 add 1
}
allies_capture
{
globalaccum 1 trigger_if_equal game_manager allieswinend
globalaccum 2 add -1
}

Basically globalaccum 1 is a flag for ‘sudden death’ mode.
If it’s not set, then when timelimit is hit it checks the flag count.
If one team has more flags than the other then they win, round over.
If teams have the same score, then sudden death mode is initiated, at which point the next flag capture wins.
Regarding an empty map - how about you simply have another accum store a ‘flag captured’ flag, meaning you set it to zero at the start, then ANY flag capture sets it to 1.
Then when timelimit is hit, if this accum is equal to zero then the match simply ends (set a wm_setwinner and end the round) since it tells you no flags at all were captured at which point 99.9999% of the time it means you had a map with no players, so end screen is irrelevant. Prevents a server hanging on your map forever if it’s empty.


(G0-Gerbil) #36

But map knowledge is as important a skill as fragging! At least that’s what mappers believe

I agree - I’ve had a few people ask for better allied options in helmsdeep (a2) (shorter respawn time, quicker to final objective etc).
This is because obviously defence is crap at the moment. But you can’t sort balance of maps out until you’ve got people playing them that know what to do and where to go. To ‘balance’ a map for total beginners to it means you unbalance the map for when it’s been played. The constant example I use is good old fueldump.
Remember when ET first came out? Covert op wins were almost the norm, but now people know to get back and build defences to prevent a sneal win :slight_smile:


(Loffy) #37

G0-Gerbil,
I agree that the map has to be empty if the score is 0-0 after full time, in 99 percent of the cases. Of course, two equally good/crappy teams CAN have the score 0-0 after full time. But it is important to design a map that will not create a hanging server. (If I was an server admin, I would remove such a map.)
Therefore, we might script it to have the design you suggested - another accum set to 0 at the start, which then becomes 1 when ANY flag is captured. As timelimit is hit the match ends (wm_setwinner 1, for example), if this accum is equal to 0.
It is a good idea.
About the rest of the script: I’ll post it later, when I’ll get home from work.
// Loffy

PS.
The map that G0-Gerbil and I are discussing, is a new custom map that futura and I are working on: Darji. It is based on an old UT map called Darji Outpost, by Alan Willard.
Here is a picture from the original map by Alan: http://firedrake.org/beerdiary/lanparty/stats04/map.CTF-Darji16.png
We have no screenies for our ET version, yet.

It is a genuine “capture the flag” - map, with mirrored bases. Axis and allied bases are identical. First team to steal 7 flags will win. If no team has 7 flags at full time, the win goes to the team that is in the lead. The respawntime is short. A team can not score (capture), if the enemy holds their flag. The team must get their own flag back first. So, the map is about flag stealing and flag recovering.

:slight_smile:

The hallways, corridors and open areas are done. We are working on the details in the script at the moment. Beta testing is undone, but we have teams ready, standing by, to do that together with us.
Hopefully,the map can be released soon.

We have tried to make the bases hard to defend. No corners to hide behind, from the defenders point of view. The attackers, though, have stuff to hide behind. This is to encourage flag stealing and to aviod games that are 0-0 at full time.


(Loffy) #38

Hm…
Suppose a team will win at full time because 1) they have made the first score in the entire game or 2) they are in the lead when the timelimit is hit. This has the potential for creating ugly, boring games: The team will just pull back and camp its own base!
They will pull back, with their panzers, and dominate the area around their own flag, as soon as they have made the first scoring OR whenever they are in the lead. (Because they know that they will win, when the timelimit is hit.) Thus creating a bad game.
How can we prevent this? (Respawntimes, respawn positions?)
// L.


(G0-Gerbil) #39

I agree that the map has to be empty if the score is 0-0 after full time, in 99 percent of the cases. Of course, two equally good/crappy teams CAN have the score 0-0 after full time. But it is important to design a map that will not create a hanging server. (If I was an server admin, I would remove such a map.)

Ive fallen foul of the old ‘CTF’ terminology yet AGAIN!
Oh well, I’ll not worry unduly about it for now then - I’m sure you guys have enough ideas to have sorted it - specifically whoever first picked up a flag should a scoreline of 0-0 be the end result seems like a reasonable ‘winner’


(G0-Gerbil) #40

Loffy - RE: your fears - well, why doesn’t this happen in Q3 etc? What do they do to ensure it’s not an issue there?
I suppose the problem is that ET is much more defence orientated than Q3 or similar fast-paced games…