File: limits.html

package info (click to toggle)
boswars 2.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 96,652 kB
  • sloc: cpp: 57,250; python: 1,715; sh: 25; makefile: 17
file content (95 lines) | stat: -rw-r--r-- 2,661 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!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>