1 (edited by [pieLover] 2015-02-19 05:30:09)

Topic: How would I allow more than one flag in the map per team?

I'm trying to make a Domination / Dominate the flags mod. So far, I have it kinda..working, surprisingly. But, it only has one Domination spot. It seems like it needs more once you hit 4 players, and would be chaos in an 8v8.

Of course, adding the flags in the map does not do it, because in `src/game/server/gamemodes/ctf.cpp` when it inserts the flag entities (https://github.com/teeworlds/teeworlds/ … tf.cpp#L32, roughly), it only inserts one per team.
It's worth noting that I have no clue what I'm doing, and I have no experience in C++.
How would I make it allow at least 2 flags per team?

Any help is much appreciated ^-^ *continues munching on hotfries*

Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

2

Re: How would I allow more than one flag in the map per team?

I've tried that in Flagdrag; the short answer is no, not possible; at least if you want to maintain compatibility with the vanilla client. Other than that, i can think of a way to hack around the restriction, similar to how the >16player servers do it, but that's bound to look ugly and will break as soon as two flags of the same color get within one snap radius of one another.

pielover88888 wrote:

It's worth noting that I have no clue what I'm doing, and I have no experience in C++.

Maybe you should work on that first, then smile

3

Re: How would I allow more than one flag in the map per team?

Shorefire beat you to the draw. https://github.com/shorefire/teeworlds-domination
And he far more things implemented already yikes Good luck though, pie

He had to take out the flag code completely, and just turned the flag into a special entity that continuously holds a marker on you while you are in the area of that entity, which also makes you control that area. I have no idea how you would do that, though.

no

4

Re: How would I allow more than one flag in the map per team?

You can add pretty much as many flags as you want. Take a look how it's done in the domination mod. Added a new download link for the zip file which contains the patch.

Remember the 80s - good times smile

5

Re: How would I allow more than one flag in the map per team?

If you are interested in a non-compatible prototype based on 0.7 branch: https://github.com/cinaera/teeworlds/tree/domination

Uses a costum entity instead of the flags, which has 3 different states (blue/neutral/red). Handling of zones is done via the distance to the domination spot, thought about adding an additional layer for this gametype.

6

Re: How would I allow more than one flag in the map per team?

Actually, Kirby, he made that because I made this. You can ask him yourself smile

Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

7

Re: How would I allow more than one flag in the map per team?

pielover88888 wrote:

Actually, Kirby, he made that because I made this. You can ask him yourself smile

Ah, so laser-statues'-eyes-DOM came of you? big_smile Well, I hope you succeed in your endeavors of this, cause shore's has really weird capture point thingys. Anyhow, good luck smile

no