Stay Out Areas for a certain team

Questions and answers about the how and why of making maps.
Post Reply
happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Stay Out Areas for a certain team

Post by happyhad » 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?

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

User avatar
Zehra
Private First Class
Private First Class
Posts: 444
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: Stay Out Areas for a certain team

Post by Zehra » Wed Jan 24, 2018 7:21 pm

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
There's this game I love and it's called Ducati. ~Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
There's always something to remember and it's been a game I love. ~Zehra
The time spent is a time which can never be regained, so it's a time to enjoy. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
The details and the skill of knowing and applying them is what excellence is made of. ~Zehra
The best player is the one who knows what to do and when and applies it successfully. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
My blog is available at zehrahblog.wordpress.com.
See when I've last been active at Strayers.

happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Re: Stay Out Areas for a certain team

Post by happyhad » Wed Jan 24, 2018 8:03 pm

Very good!

Thanks!

User avatar
optic delusion
Special Forces
Special Forces
Posts: 966
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Stay Out Areas for a certain team

Post by optic delusion » Tue Feb 13, 2018 2:44 am

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.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests