| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 |
<html><head> |
| 3 |
<!-- |
| 4 |
---- (c) Copyright 2010 by Francois Beerten |
| 5 |
|
| 6 |
---- This program is free software; you can redistribute it and/or modify |
| 7 |
---- it under the terms of the GNU General Public License as published by |
| 8 |
---- the Free Software Foundation; only version 2 of the License. |
| 9 |
---- |
| 10 |
---- This program is distributed in the hope that it will be useful, |
| 11 |
---- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
---- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
---- GNU General Public License for more details. |
| 14 |
---- |
| 15 |
---- You should have received a copy of the GNU General Public License |
| 16 |
---- along with this program; if not, write to the Free Software |
| 17 |
---- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 18 |
---- 02111-1307, USA. |
| 19 |
--> |
| 20 |
<title>Bos Wars Scripting API: Limits</title> |
| 21 |
<meta http-equiv="Content-Type" content="text/html; CHARSET=iso-8859-1"> |
| 22 |
<link rel="stylesheet" type="text/css" href="scripts.css"> |
| 23 |
</head> |
| 24 |
<body> |
| 25 |
<h1>Bos Wars Scripting API: Limits</h1> |
| 26 |
<hr> |
| 27 |
<a href="../index.html">Bos Wars</a> |
| 28 |
<a href="../faq.html">FAQ</a> |
| 29 |
<a href="mapsetup.html">PREV</a> |
| 30 |
<a href="savegame.html">NEXT</a> |
| 31 |
<a href="index.html">LUA Index</a> |
| 32 |
<hr> |
| 33 |
<a href="#DefineUnitAllow">DefineUnitAllow</a> |
| 34 |
<a href="#DefineAllow">DefineAllow</a> |
| 35 |
<hr> |
| 36 |
<h2>Functions</h2> |
| 37 |
|
| 38 |
<a name="DefineUnitAllow"></a> |
| 39 |
<h3>DefineUnitAllow(name, N, N, N, N, N, N, N, N, N)</h3> |
| 40 |
|
| 41 |
Define how many units of a given type each player can have. |
| 42 |
|
| 43 |
<dl> |
| 44 |
<dt>name</dt> |
| 45 |
<dd>Name of an unit-type. |
| 46 |
</dd> |
| 47 |
<dt>N</dt> |
| 48 |
<dd> |
| 49 |
The maximum number of units of th given type allowed for the player. |
| 50 |
There's a number for each player. The first is player 0 and the last |
| 51 |
is player 8. |
| 52 |
</dd> |
| 53 |
</dl> |
| 54 |
|
| 55 |
<h4>Example</h4> |
| 56 |
|
| 57 |
<pre class="lua"> |
| 58 |
-- Allow 1 assault unit for the 2nd player. |
| 59 |
DefineUnitAllow("unit-assault", 0, 1, 0, 0, 0, 0, 0, 0, 0, 0) |
| 60 |
</pre> |
| 61 |
|
| 62 |
|
| 63 |
<a name="DefineAllow"></a> |
| 64 |
<h3>DefineAllow(name, str9)</h3> |
| 65 |
|
| 66 |
Define which unit types are allowed for each player. |
| 67 |
|
| 68 |
<dl> |
| 69 |
<dt>name</dt> |
| 70 |
<dd>Name of the unit type. |
| 71 |
</dd> |
| 72 |
<dt>str9</dt> |
| 73 |
<dd> |
| 74 |
The initial allow state for the upgrade at level start: |
| 75 |
<ul> |
| 76 |
<li>A - Allowed |
| 77 |
<li>F - Forbidden |
| 78 |
</ul> |
| 79 |
There is one letter per player. The first applies to player 0 and the last |
| 80 |
applies to player 8. |
| 81 |
</dd> |
| 82 |
</dl> |
| 83 |
|
| 84 |
<h4>Example</h4> |
| 85 |
|
| 86 |
<pre class="lua"> |
| 87 |
-- Allow assault units all players. |
| 88 |
DefineAllow("unit-assault", "AAAAAAAAA") |
| 89 |
</pre> |
| 90 |
|
| 91 |
|
| 92 |
<hr> |
| 93 |
All trademarks and copyrights on this page are owned by their respective owners. |
| 94 |
<address>(c) 2010 by<a href="http://boswars.org"> |
| 95 |
The Bos Wars Project</a></address></body></html> |