Custom CTF entity help

  • If you're asking a question make sure to set the thread type to be a question!

Bermuda Cake

L9: Fashionable Member
Feb 20, 2009
679
480
Hi, I've only got one thing to fix before I can release my map, but when testing I realised a problem:

The aim is for red to capture all 3 flags within a time limit, each flag adding time, but if they only get 1/2 at the moment, they still win as they have more caps than blue team. How would I go about doing this?

TY to anyone who takes this up
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
I think you'd need a math_counter rather than a logic_compare. You may also want to set the item_teamflag's gametype to something other than "CTF", this will prevent captures from being counted the normal way. This is important because server operators can set the number of flag captures for a win to something other then three. Your setup sounds like a variation on A/D CTF, so you should look into that.
 
T

The Asylum

Hi, I've only got one thing to fix before I can release my map, but when testing I realised a problem:

The aim is for red to capture all 3 flags within a time limit, each flag adding time, but if they only get 1/2 at the moment, they still win as they have more caps than blue team. How would I go about doing this?

TY to anyone who takes this up

So, all RED has to do is just cap one time, and they'll win regardless of what else happens for the remainder of the round? Seems to me like that's a little unfair to BLU.
 

Bermuda Cake

L9: Fashionable Member
Feb 20, 2009
679
480
So, all RED has to do is just cap one time, and they'll win regardless of what else happens for the remainder of the round? Seems to me like that's a little unfair to BLU.

No, thats the problem! The aim was to have it so red have to cap all 3 to win, but this is what is happening at the moment.

I might make it so blue get 2 captures when the round begins, anyone know how to do this?
 
T

The Asylum

Do yo have a team_round_timer and a round_win? I'm away from my mapping computer so what I'm suggesting may not work but here goes.

Your round_win entity, set it to BLU team. Now on your team round timer, create this output:

name: OnFinished
target: (your round_win)
input: RoundWin

This should hopefully tell the game that BLU has won when the timer hits zero.
 

Undies

L1: Registered
Dec 24, 2009
45
9
Do yo have a team_round_timer and a round_win? I'm away from my mapping computer so what I'm suggesting may not work but here goes.

Your round_win entity, set it to BLU team. Now on your team round timer, create this output:

name: OnFinished
target: (your round_win)
input: RoundWin

This should hopefully tell the game that BLU has won when the timer hits zero.
one better, add a second round_win and a logic_compare :p
have the timer trigger the compare rather than the Blu roundwin, it compares the number of caps vs 3 and then triggers the appropriate roundwin after...

From the start, entities needed:
Three item_teamflag, named "Flags"
Two round_win, named "RedWin" and "BluWin." Set teams appropriately
A math_counter, named "CapCount." Set max legal value to 3
A logic_compare, name "Compare." Set the compare value as 2
A team_round_timer, named "Time"

Time has the output:
Code:
OnFinished - Compare - Compare
When the timer runs out it trigger the logic_compare to compare against 2

Flags have the output:
Code:
OnCapture -  Time - AddTime - 60
OnCapture - CapCount - Add - 1
each cap adds time and adds one to the counter

CapCount has the output:
Code:
OutValue - Compare - SetValue
OnHitMax - RedWin - RoundWin
each time this is triggered (by changing the counters value, in our case, when a flag is capped) it increases the number by which the logic_compare will compare vs 2, or if all three caps are made, red wins

Compare has the output:
Code:
OnLessThan - BluWin - RoundWin
OnEqualTo - RedWin - RoundWin
OnGreaterThan - RedWin - RoundWin
if 0 or 1 cap has been made, Blu Wins
if 2 are made, Red Wins
if 3 caps are made Red Wins (though this should be triggered by the counter, not the compare)

hope t hat explains a bit better