Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 6ef0fdc2c18d666ec7b59c27c05c5d78 > files > 22

boswars-2.7-10.20170903.1.mga6.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<!--
----	(c) Copyright 2010 by Francois Beerten

----    This program is free software; you can redistribute it and/or modify
----    it under the terms of the GNU General Public License as published by
----    the Free Software Foundation; only version 2 of the License.
----
----    This program is distributed in the hope that it will be useful,
----    but WITHOUT ANY WARRANTY; without even the implied warranty of
----    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
----    GNU General Public License for more details.
----
----    You should have received a copy of the GNU General Public License
----    along with this program; if not, write to the Free Software
----    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
----    02111-1307, USA.
-->
    <title>Bos Wars Scripting API: Limits</title>
    <meta http-equiv="Content-Type" content="text/html; CHARSET=iso-8859-1">
    <link rel="stylesheet" type="text/css" href="scripts.css">
</head>
<body>
    <h1>Bos Wars Scripting API: Limits</h1>
<hr>
<a href="../index.html">Bos Wars</a> 
<a href="../faq.html">FAQ</a> 
<a href="mapsetup.html">PREV</a> 
<a href="savegame.html">NEXT</a> 
<a href="index.html">LUA Index</a> 
<hr>
<a href="#DefineUnitAllow">DefineUnitAllow</a>
<a href="#DefineAllow">DefineAllow</a>
<hr>
<h2>Functions</h2>

<a name="DefineUnitAllow"></a>
<h3>DefineUnitAllow(name, N, N, N, N, N, N, N, N, N)</h3>

Define how many units of a given type each player can have.

<dl>
<dt>name</dt>
<dd>Name of an unit-type.
</dd>
<dt>N</dt>
<dd>
  The maximum number of units of th given type allowed for the player.
  There's a number for each player. The first is player 0 and the last
  is player 8.
</dd>
</dl>

<h4>Example</h4>

<pre class="lua">
-- Allow 1 assault unit for the 2nd player.
DefineUnitAllow("unit-assault", 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)
</pre>


<a name="DefineAllow"></a>
<h3>DefineAllow(name, str9)</h3>

Define which unit types are allowed for each player.

<dl>
<dt>name</dt>
<dd>Name of the unit type.
</dd>
<dt>str9</dt>
<dd>
  The initial allow state for the upgrade at level start:
  <ul>
  <li>A - Allowed
  <li>F - Forbidden
  </ul>
  There is one letter per player. The first applies to player 0 and the last
  applies to player 8.
</dd>
</dl>

<h4>Example</h4>

<pre class="lua">
-- Allow assault units all players.
DefineAllow("unit-assault", "AAAAAAAAA")
</pre>


<hr>
All trademarks and copyrights on this page are owned by their respective owners.
<address>(c) 2010 by<a href="http://boswars.org">
The Bos Wars Project</a></address></body></html>