Page 1 of 1

Stay Out Areas for a certain team

Posted: Wed Jan 24, 2018 6:08 pm
by happyhad
I know that there is a way to a make a mine by using a zone and physics.
But is there a way to make it so that it only effects certain teams?
So a mine will blow up Red players but not Green?

I basically want to make stay out areas, where one team is allowed in an area and another is not.

A separate question. Is there a way to define an area where you have a flag power and when you leave you drop it.
Example in this area you can shoot lazer but when you leave you loose that power


Thanks

Re: Stay Out Areas for a certain team

Posted: Wed Jan 24, 2018 7:21 pm
by Zehra
happyhad wrote: Wed Jan 24, 2018 6:08 pm I know that there is a way to a make a mine by using a zone and physics.
But is there a way to make it so that it only effects certain teams?
So a mine will blow up Red players but not Green?
This could probably be done with a modification to the 'wwzone' plug-in.
Some checks would be needed for teams and some options added too, but it probably wouldn't be too complicated.(I'm assuming.)
happyhad wrote: Wed Jan 24, 2018 6:08 pm Is there a way to define an area where you have a flag power and when you leave you drop it.
Example in this area you can shoot lazer but when you leave you loose that power
This can be done using the 'flagStay' plug-in.
From the README on GitHub:

Code: Select all

BZFlag Server Plugin: flagStay
================================================================================

The flagStay plugin adds a custom map object that allows you to prevent
specific flags from leaving a defined area (either rectangular or circular).


Loading the plugin
--------------------------------------------------------------------------------

This plugin takes no optional arguments, so load it with:

  -loadplugin flagStay


Map Objects
--------------------------------------------------------------------------------

The plugin adds a 'flagstayzone' object type.  You will specify this when
creating a custom zone.  Both zone shapes will use a 'pos' (position),
'message', and one or more 'flag' attributes.  The rectangular type will use a
'size' and 'rot' (rotation) attribute, and the circular type will use a 'radius'
and 'height' attribute.  This plugin would almost always be used in combination
with a normal 'zone' object that would spawn flags in a specific area using the
'zoneflag' attribute.

# Here's an example of a rectangular zone that prevents GM and L from leaving a
# tower area.

# Spawn 5 GM, 5 L, and 1 G flags on the tower.
zone
  pos 0 0 40
  size 10 10 1
  zoneflag GM 5
  zoneflag L 5
  zoneflag G 1
end

# Keep GM and L within the tower.
flagstayzone
  pos 0 0 40
  size 10 10 10
  rot 45
  message "You can't leave the tower with that flag!"
  flag GM
  flag L
end


# Here's an example of a circular flagstay zone that keeps a machine gun flag in
# a defined area.

# Spawn an MG flag at 80 0 0 within a 1 by 1 area.
zone
  pos 80 0 0
  size 1 1 1
  zoneflag MG 1
end

# Keep it within a 5 unit radius of the center.
flagstayzone
  pos 80 0 0
  radius 5
  height 10
  message "The MG can't leave the turret area"
  flag MG
end
-Zehra

Re: Stay Out Areas for a certain team

Posted: Wed Jan 24, 2018 8:03 pm
by happyhad
Very good!

Thanks!

Re: Stay Out Areas for a certain team

Posted: Tue Feb 13, 2018 2:44 am
by optic delusion
The King of the Hill (KOTH) plugin also springs to mind.
I am very skeptical that you will be able to get any world weapon to do team checks, but the only reason I say that is.... If it was possible someone would have already done it. But having said that... I can't remember anyone WANTING to do that, I don't think it's ever been tried.