Coder Social home page Coder Social logo

allejo / shotlimitzone Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 50 KB

A BZFlag plugin that allows you add shot limits to flags based on the location where they are picked up.

License: MIT License

C++ 95.11% Makefile 4.89%
bzflag bzflag-plugin

shotlimitzone's Introduction

Shot Limit Zone

GitHub release Minimum BZFlag Version License

A BZFlag plugin that allows you add shot limits to flag based on the location of the flag. The difference between this plugin and the default BZFS -sl option is that by using the option, you are limiting all of the flags of the same type where with this plugin you will only limit the shot limit of a flag if grabbed from a specific area in the map. This plugin will not overwrite the -sl option.

Requirements

  • BZFlag 2.4.4+

This plug-in follows my standard instructions for compiling plug-ins.

Usage

Loading the plug-in

This plug-in does not take any configuration options at load time.

-loadplugin shotLimitZone

Custom Map Objects

This plug-in introduces the SHOTLIMITZONE map object which supports the traditional position, size, and rotation attributes for rectangular objects and position, height, and radius for cylindrical objects.

Box

shotLimitZone
  position 0 0 0
  size 10 10 5
  rotation 0
  shotLimit 10
  flag SW
end

Cylinder

shotLimitZone
  position 0 0 0
  radius 15
  height 10
  shotLimit 10
  flag SW
end

Notes

  • This custom zone will not actually spawn a SW flag, you will need to add a regular zone object to do so.
  • The name ('shotLimitZone') of the object is case-insensitive so camel case is not required.

License

MIT

shotlimitzone's People

Contributors

achoopic avatar allejo avatar zehra avatar

Watchers

 avatar  avatar  avatar

Forkers

achoopic

shotlimitzone's Issues

Enhancement: Option to have shot limits applied to flags stolen by thief

An option of shotZoneLimits applying to specified flags which originate from the shotLimitZone, regardless if they are stolen would be nice.

Currently:
PlayerA grabs Laser from shotLimitZone with 5 shots set as limit.
PlayerA fires 4 rounds, leaving 1 shot remaining.
PlayerB steals PlayerA's Laser flag with Thief.
PlayerB has Laser flag with shot limits from server.

Enhancement
PlayerA grabs Laser from shotLimitZone with 5 shots and "thief" option added.
(Thief option causes limits to apply, even if the flag is stolen by thief.)
PlayerA fires 4 rounds, leaving 1 shot remaining.
PlayerB steals PlayerA's Laser flag with Thief.
PlayerB has Laser flag with 1 shot left.

Segfault

Segmentation fault occurs when a player holding a restriction flag and the opposing team captures the flag. Something to do with flag dropped event

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.