TeamWeapons - just started
TeamWeapons - just started
Requirements: Development BZFlag from svn at revision 19878.
This is a simple plug-in I started last night. The plug-in changes the shot types for specific teams. I believe at one point there was a plug-in that assigned flags to teams, where one team would always get laser, another would get guided missile, and so on. In contrast, the TeamWeapons plug-in allows you to pick up a wings flag or a cloaking flag and still have the shot type assigned to a team.
It is not finished. I posted the source code if anyone want to mess around with it.
**edit - The download is in a lower post. **
This is a simple plug-in I started last night. The plug-in changes the shot types for specific teams. I believe at one point there was a plug-in that assigned flags to teams, where one team would always get laser, another would get guided missile, and so on. In contrast, the TeamWeapons plug-in allows you to pick up a wings flag or a cloaking flag and still have the shot type assigned to a team.
It is not finished. I posted the source code if anyone want to mess around with it.
**edit - The download is in a lower post. **
- Attachments
-
- bzfi0094.jpg
- Screenie... The green team has Laser. The red team has GM.
- (296.48 KiB) Downloaded 60 times
-
- bzfi0095.jpg
- Screenie... The green team has Laser. The red team has GM.
- (311.41 KiB) Downloaded 53 times
Last edited by Enigma on Fri Sep 18, 2009 12:45 am, edited 1 time in total.
- clarahobbs
- Private First Class
- Posts: 272
- Joined: Thu Jan 10, 2008 1:45 am
- Location: The Fourth Dimension
Re: TeamWeapons - just started
Oh cool! That sounds amazing. I can imagine someone having cloaking/laser and never killing himself. And those graphics - I had no idea that BZFlag 3 had such beautiful laser beams!
FKA Ratfink
Re: TeamWeapons - just started
Ahem, is there Guided Geno?
But really, that is a cool plugin. "Shot Switcher" <-- Name?
But really, that is a cool plugin. "Shot Switcher" <-- Name?
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
GU League | Ducati League | OpenLeague
GU League | Ducati League | OpenLeague
Re: TeamWeapons - just started
aww snap! me and flying_popcorn (i think it was him) were talking about releasing a pplugin and map just like that in 3.0!!!!! darnet
- die muszx double
- Private First Class
- Posts: 44
- Joined: Thu May 28, 2009 10:38 am
- Location: In the UK playing BZflag
Re: TeamWeapons - just started
Lol, you could have CL and ST
My apple mac is natural
die muszx double
die muszx double
Re: TeamWeapons - just started
No, actually. The API only supports the changing of shot types, not flag effects. And the API can only set the shot type to one shot type (so no guided geno or laser).die muszx double wrote:Lol, you could have CL and ST
So for example you could have these shot & flag combos:
- GM + WG
- L + WG (that'd be interesting )
- CL + WG
- CL + L
- G + WG
- G + ST
- etc.
- G + L
- WG + ST
- L + GM
- G + IB
- etc.
- Yassen
Re: TeamWeapons - just started
Actually the there isn't a genocide shot type:
Code: Select all
typedef enum {
eNoShot = 0,
eStandardShot,
eGMShot,
eLaserShot,
eThiefShot,
eSuperShot,
ePhantomShot,
eShockWaveShot,
eRicoShot,
eMachineGunShot,
eInvisibleShot,
eCloakedShot,
eRapidFireShot,
eLastShotType
} bz_eShotType;
Re: TeamWeapons - just started
This is the current source code right now. I added a command to change the shot types while the plug-in is loaded.
The command works as follows:
There are two actions as of posting this: set and info. The info action takes no parameters, and set requires two parameters. The set action has the following form:
where
and
For instance, to set the GM shot type for the red team, you would use
Note that it is case sensitive.
The code is released under the MIT license. It is very non-restrictive, and I'm not too worried what people do with the code. Have fun.
The command works as follows:
Code: Select all
/tw <action> <param_1> <param_2> ... <param_N>
Code: Select all
/tw set <team> <flag_code>
Code: Select all
team := red | green | blue | purple | rogue | hunter | rabbit;
Code: Select all
flag_code := standard | GM | L | TH | SB | PZ | SW | R | MG | IB | CS | F;
Code: Select all
/tw set red GM
The code is released under the MIT license. It is very non-restrictive, and I'm not too worried what people do with the code. Have fun.
- Attachments
-
- TeamWeapons.zip
- Source code only! I will not post any binaries, at least not yet.
- (62.78 KiB) Downloaded 269 times
Re: TeamWeapons - just started
I should also add, the shot types will not change until a flag is grabbed. Without a flag, everyone has the standard shot type. If someone is holding a flag while the shot type is changed, the changes will not take effect until the current flag is dropped and a new flag is grabbed.
- clarahobbs
- Private First Class
- Posts: 272
- Joined: Thu Jan 10, 2008 1:45 am
- Location: The Fourth Dimension
Re: TeamWeapons - just started
Oh wow, this sounds absolutely amazing. Changing the shot type for the rabbit team could be really useful, as it could actually give people some incentive to become rabbit. Would it be possible to make it change shot type for people in a certain area of a map specified in the .bzw file?
FKA Ratfink
Re: TeamWeapons - just started
And being the only person to be able to score isn't enough incentive?Ratfink wrote:Oh wow, this sounds absolutely amazing. Changing the shot type for the rabbit team could be really useful, as it could actually give people some incentive to become rabbit.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
Re: TeamWeapons - just started
Probably. It would require more code though. It would probably be better as a separate plug-in.Ratfink wrote:Would it be possible to make it change shot type for people in a certain area of a map specified in the .bzw file?
Re: TeamWeapons - just started
when you say that we must have revision 19878, do we actually need that revision?
Im pretty sure but im not positive, because when i compiled then loaded the plugin, it loaded fine and i could type /tw info, but it would not let me set shot types!
if we do need a specific revision, do you know if this is a bug and if so when you plan to fix it for the 3.0 release?
thanks enigma.
Im pretty sure but im not positive, because when i compiled then loaded the plugin, it loaded fine and i could type /tw info, but it would not let me set shot types!
if we do need a specific revision, do you know if this is a bug and if so when you plan to fix it for the 3.0 release?
thanks enigma.
Re: TeamWeapons - just started
More than likely that would be a minimum revision that you need.
Re: TeamWeapons - just started
Blast is right. I meant it as the minimum revision. I'm not even sure if you would need that revision. It was the revision I tested the plug-in with, so it's more of a recommendation. Everyone should have a newer revision anyway.
What happened when you tried to set the shot types? If you type in the command wrong, you should get an error message. If you type it in correctly, you should get the message "Shot type set for ..."
Just in case you didn't see this...
What happened when you tried to set the shot types? If you type in the command wrong, you should get an error message. If you type it in correctly, you should get the message "Shot type set for ..."
Just in case you didn't see this...
Enigma wrote:I should also add, the shot types will not change until a flag is grabbed. Without a flag, everyone has the standard shot type. If someone is holding a flag while the shot type is changed, the changes will not take effect until the current flag is dropped and a new flag is grabbed.
Re: TeamWeapons - just started
i dont get that at all. it doesnt say command not recongized or anything. it just does nothing. so i type it and i get nothing, not even an error.Enigma wrote: What happened when you tried to set the shot types? If you type in the command wrong, you should get an error message. If you type it in correctly, you should get the message "Shot type set for ..."
dont worry i saw that. i tried picking up neumerous flags that dont change shot types, ex: st, cl, mq, etc. nothing.Enigma wrote: Just in case you didn't see this...
Re: TeamWeapons - just started
Sorry about replying so late. I haven't been coming here lately. I'm going to compile it and test it, and I'll let you know what happens.
Re: TeamWeapons - just started
I just tried it. It works for me. I don't know why it doesn't work for you.
Re: TeamWeapons - just started
I havent tried it in a while but Ill compile it later today and let you know the results.
Thanks for your response Enigma
Thanks for your response Enigma
Re: TeamWeapons - just started
I would have tested it sooner, but bzflag doesn't always build, but that is expected to happen. I had to rename the header TeamWeapons/include/EventHandler.h to get it to compile. The build system was getting it confused with bzflag/include/EventHandler.h for some reason.
Also, run "rm -rf *" in plugins/TeamWeapons/.libs before you build the plug-in.
Also, run "rm -rf *" in plugins/TeamWeapons/.libs before you build the plug-in.