AntiSpawnCamp

Expand and mod your server.
Post Reply
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

AntiSpawnCamp

Post by Enigma »

AntiSpawnCamp

Author: Devin DeLong (Enigma)
Requirements: Current BZFlag2.0.9 from SVN with the flag control functions
Binary Requirements: Mac OS 10.3.9


Description

This is a simple plugin that kills players that are too close to the loser's base when their flag is captured. It is intended to kill spawn campers, but it is not perfect, of course.

To use it, just pass one parameter to the plugin when you load it. That parameter is the distance that is used to determine who might be spawn camping. Anyone within that distance is killed.

You can also use it to kill everyone on the map on flag capture. :twisted:
Last edited by Enigma on Sat Jun 30, 2007 8:59 pm, edited 1 time in total.
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

This is a small update.

I didn't like the fact that the plugin would re-find the team bases every time a flag was captured. Actually it did that for every player when looping through the players when a flag was captured, and the bases aren't going anywhere.

Now it only finds the team bases when the plugin is loaded. It does this by resetting the team flags. Then the plugin gets the position of each team flag.
Attachments
AntiSpawnCamp-PPC-Bin.tar
(540 KiB) Downloaded 470 times
AntiSpawnCamp-Source.tar
(90 KiB) Downloaded 465 times
charg
Private First Class
Private First Class
Posts: 36
Joined: Thu Jun 28, 2007 11:11 pm

Post by charg »

Very Nice! This is a very good idea :D
Make sure you get my new Map Editor!: http://my.bzflag.org/bb/viewtopic.php?p=115526#115526
User avatar
too much loving
Private First Class
Private First Class
Posts: 94
Joined: Sun May 23, 2004 7:47 pm
Location: Denmark
Contact:

Post by too much loving »

That is a nice idea.

By the way, would it be possible to achieve the same effect by firing a world weapon SW which is centered at the base of the defeated team? That would add some extra graphics to the killing.
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

Enigma
While I like your idea, I hope you are aware you can do this same thing with BZW code, except via world weapons (usually SW) - not just killing them. This is done with the trigger oncap option of the weapon object.

Though, this would be convenient for those who do not want to set-up SW (or other types) on cap triggers in their map. I can see how your plugin would confuse noobs as to why they are dying if they are too close to the enemy base on cap, whereas on cap SWs would not. (Although your plugin might tell the player why they were killed, I have not looked at that)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

A Meteorite wrote:(Although your plugin might tell the player why they were killed, I have not looked at that)

Code: Select all

      bz_sendTextMessage(BZ_SERVER, 
                         player->playerID, 
                         "You were killed by the AntiSpawnCamp plugin");
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

A Meteorite wrote:Enigma
While I like your idea, I hope you are aware you can do this same thing with BZW code, except via world weapons (usually SW) - not just killing them. This is done with the trigger oncap option of the weapon object.
I had no idea that was possible. Heck I have never even made a map.
too much loving wrote:That is a nice idea.

By the way, would it be possible to achieve the same effect by firing a world weapon SW which is centered at the base of the defeated team? That would add some extra graphics to the killing.
I like your idea; however, I did not do this because I have had some negative experience with this method. At overlord, almost every time a flag was captured, some players on the losing team would spawn early and get killed by the world weapon. I will still try it though, since a plugin has the ability to temporarily change server variables, and then change them back.
Fark Simmons
Private First Class
Private First Class
Posts: 5
Joined: Tue May 29, 2007 4:46 pm

Post by Fark Simmons »

Forgive the question, but how would you compile this if you're doing it "from source" and you don't have a Mac? I am using Linux.
jpenguin
Private First Class
Private First Class
Posts: 128
Joined: Wed Jun 11, 2008 11:56 pm

Post by jpenguin »

I have a make and i don't even know how to compile this
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

jpenguin wrote:I have a make and i don't even know how to compile this
You have to:

Get the BZFlag source code.

Get the plug-in source code.

Read how to add a plug-in to the project. The bzflag/plugins/newplug.sh shell script might help with this. The shell script will tell you to edit bzflag/configure.ac and bzflag/plugins/Makefile, which you have to do.

Read how to compile BZFlag with plug-ins. In the current version, you have to configure with --enable-shared to get PIC code and --enable-plugins to build the plug-ins.

The wiki and the README files in bzflag/ are good places to get information from.

The next release will make this a little easier.
lol_u died

Post by lol_u died »

So this is for mac only? Because I have a great map but you can camp to easily. And I would like to use this for my map.
jpenguin
Private First Class
Private First Class
Posts: 128
Joined: Wed Jun 11, 2008 11:56 pm

Post by jpenguin »

forget this, I'm just going to add World Weapon SW's set to 'oncap'
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

lol_u died wrote:So this is for mac only? Because I have a great map but you can camp to easily. And I would like to use this for my map.
You would need your hoster to compile the plugin if they are not using a PPC Mac with the correct BZFS API.
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
Post Reply