author | RedGrinner |
Mon, 06 Dec 2010 14:42:31 +0000 | |
changeset 51 | 5ab1cf4c7194 |
parent 50 | 9033b970cbf7 |
child 52 | 714b56de5ea1 |
permissions | -rw-r--r-- |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
1 |
#labels 80 |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
2 |
<wiki:toc max_depth="3" /> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
3 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
4 |
== Global available Constants == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
5 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
6 |
<blockquote><tt>LAND_WIDTH</tt>, <tt>LAND_HEIGHT</tt> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
7 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
8 |
Game flags: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
9 |
|
21 | 10 |
<blockquote><tt>gfForts, gfMultiWeapon, gfSolidLand, gfDivideTeams, gfLowGravity, gfLaserSight, gfInvulnerable, gfMines, gfVampiric, gfKarma, gfArtillery, gfOneClanMode, gfRandomOrder, gfKing, gfPlaceHog, gfSharedAmmo, gfDisableGirders, gfExplosives, gfDisableLandObjects, gfAISurvival, gfInfAttack, gfResetWeps, gfPerHogAmmo, gfDisableWind</tt></blockquote> |
13 | 11 |
More constants at [GearTypes Gear Types] , [AmmoTypes Ammo Types], [Sounds], [States] |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
12 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
13 |
Additional global changing variables accessible: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
14 |
|
24 | 15 |
* <tt>!ClansCount</tt> - number of clans in the game (teams with the same color belong to one clan) |
16 |
* <tt>!TeamsCount</tt> - number of teams in the game |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
17 |
* <tt>!TurnTimeLeft</tt> - number of game ticks left until the current turn ends |
24 | 18 |
* <tt>!GameTime</tt> - number of total game ticks |
19 |
* <tt>!RealTime</tt> - number of total ticks |
|
20 |
* <tt>!TotalRounds</tt> - number of round that has passed |
|
47
adf440f87f1e
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
46
diff
changeset
|
21 |
* <tt>!CurrentHedgehog</tt> - the hedgehog gear that is currently in play |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
22 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
23 |
== Event Handlers == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
24 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
25 |
=== <tt>onGameInit()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
26 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
27 |
<blockquote>This function is called before the game loads its resources. One can modify various game variables here: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
28 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
29 |
* <tt>Seed = 0</tt> - sets the seed of the random number generator |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
30 |
* <tt>!GameFlags = gfSolidLand + gfArtillery + …</tt> - sets the gameflags, see above for the available flags |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
31 |
* <tt>!TurnTime = 60000</tt> - set the turntime in ms |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
32 |
* <tt>!CaseFreq = 0</tt> - frequency of crate drops |
22 | 33 |
* <tt>!HealthCaseProb = 35</tt> - chance of receiving a health crate |
34 |
* <tt>!HealthCaseAmount = 25</tt> - amount of health in a health crate |
|
21 | 35 |
* <tt>!DamagePercent = 100</tt> - percent of damage to inforce |
23 | 36 |
* <tt>!MinesNum = 0</tt> - number of mines being placed (before 0.9.14 !LandAdds) |
21 | 37 |
* <tt>!MinesTime = 3</tt> - time for a mine to explode from activated, -1 for random |
38 |
* <tt>!MineDudPercent = 0</tt> - chance of mine being a dud |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
39 |
* <tt>Explosives = 0</tt> - number of explosives being placed |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
40 |
* <tt>Delay = 0</tt> - delay between each round |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
41 |
* <tt>!SuddenDeathTurns = 30</tt> - turns until sudden death begins |
22 | 42 |
* <tt>!WaterRise = 47</tt> - height of water rise at sudden death in pixels |
43 |
* <tt>!HealthDecrease = 5</tt> - amount of health decreased on sudden death |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
44 |
* <tt>Map = "Bamboo"</tt> - the map being played |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
45 |
* <tt>Theme = "Bamboo"</tt> - the theme to be used |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
46 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
47 |
If you want to add teams or hogs manually you have to do it here. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
48 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
49 |
=== <tt>onGameStart()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
50 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
51 |
<blockquote>This function is called when the first round starts. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
52 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
53 |
Can be used to show the mission and for more setup, for example initial target spawning. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
54 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
55 |
=== <tt>onGameTick()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
56 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
57 |
<blockquote>This function is called on every game tick, i.e. 1000 times a second. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
58 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
59 |
=== <tt>onGearAdd(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
60 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
61 |
<blockquote>This function is called when a new gear is added. Useful in |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
62 |
combination with <tt>!GetGearType(gearUid)</tt>. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
63 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
64 |
=== <tt>onGearDelete(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
65 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
66 |
<blockquote>This function is called when a new gear is deleted. Useful in |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
67 |
combination with <tt>!GetGearType(gearUid)</tt>. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
68 |
</blockquote> |
44
bf53e635a2ac
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
43
diff
changeset
|
69 |
=== <tt>onGearResurrect(gearUid)</tt> === |
bf53e635a2ac
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
43
diff
changeset
|
70 |
|
46
6c818c9fc1d5
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
45
diff
changeset
|
71 |
<blockquote>This function is called when a gear is resurrected. CPU Hogs will resurrect if gfAISurvival is included in !GameFlags. Alternatively, specific gears can have heResurrectable set to true via !SetEffect. |
44
bf53e635a2ac
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
43
diff
changeset
|
72 |
</blockquote> |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
73 |
=== <tt>onAmmoStoreInit()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
74 |
|
13 | 75 |
<blockquote>This function is called when the game is initialized to request the available ammo and ammo probabilities. Use !SetAmmo here. |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
76 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
77 |
== Functions for creating gears == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
78 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
79 |
=== <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
80 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
81 |
<blockquote>This creates a new gear at position x,y (measured from top left) of kind gearType (see [GearTypes Gear Types]). The initial velocities are dx and dy. All arguments are numbers. The function returns the uid of the gear created. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
82 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
83 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
84 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
85 |
<code lang="lua"> local gear = !AddGear(0, 0, gtTarget, 0, 0, 0, 0) |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
86 |
!FindPlace(gear, true, 0, LAND_WIDTH)</code> |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
87 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
88 |
=== <tt>!AddVisualGear(x, y, viusalGearType, state, critical)</tt> === |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
89 |
|
42
565e15a60043
Edited wiki page LuaAPI through web user interface.
kyberneticist
parents:
39
diff
changeset
|
90 |
<blockquote>This creates a new visual gear at position x,y (measured from top left) of kind visualGearType (see [VisualGearTypes Visual Gear Types]). The function returns the uid of the visual gear created. Set critical to true if the visual gear is crucial to game play. False if it is just an effect, and can be skipped when in fastforward (such as when joining a room). A critical visual gear will always be created, a non-critical one may fail. Most visual gears delete themselves. |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
91 |
</blockquote> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
92 |
Example: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
93 |
|
50
9033b970cbf7
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
49
diff
changeset
|
94 |
<code lang="lua"> -- adds an non-critical explosion at position 1000,1000. Returns 0 if it was not created. |
9033b970cbf7
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
49
diff
changeset
|
95 |
vgear = !AddVisualGear(1000, 1000, vgtExplosion, 0, false) |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
96 |
</code> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
97 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
98 |
=== <tt>!SpawnHealthCrate(x, y)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
99 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
100 |
<blockquote>Spawns a health crate at the specified position. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
101 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
102 |
=== <tt>!SpawnAmmoCrate(x, y, ammoType)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
103 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
104 |
<blockquote>Spawns an ammo crate at the specified position with content of ammoType (see [AmmoTypes Ammo Types]). Because by default settings the number of ammo in crates is zero it has to be increased to at least one with SetAmmo first, see the example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
105 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
106 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
107 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
108 |
<code lang="lua"> !SetAmmo(amGrenade, 0, 0, 0, 1) -- see below |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
109 |
!SpawnAmmoCrate(0, 0, amGrenade) -- x=y=0 means random position on map</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
110 |
=== <tt>!SpawnUtilityCrate(x, y, ammoType)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
111 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
112 |
<blockquote>Spawns an utility crate at specified position with content of ammoType. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
113 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
114 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
115 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
116 |
<code lang="lua"> !SetAmmo(amLaserSight, 0, 0, 0, 1) |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
117 |
!SpawnUtilityCrate(0, 0, amLaserSight)</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
118 |
=== <tt>!AddTeam(teamname, color, grave, fort, voicepack)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
119 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
120 |
<blockquote>Adds a new team. Note that this can only be done in onGameInit(), not at a later time. First argument is the team name followed by color, grave, fort and voicepack settings. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
121 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
122 |
Notice: This works only for singleplayers training missions for now and will desync multiplayer games. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
123 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
124 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
125 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
126 |
<code lang="lua"> !AddTeam("team 1", 14483456, "Simple", "Island", "Default")</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
127 |
=== <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
128 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
129 |
<blockquote>Adds a new hedgehog for current team (last created one), with botlevel and specified health also head. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
130 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
131 |
Notice: This works only for singleplayers training missions for now and will desync multiplayer games. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
132 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
133 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
134 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
135 |
<code lang="lua"> local player = !AddHog("HH 1", 0, 100, "!NoHat") -- botlevel 0 means human player |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
136 |
!SetGearPosition(player, 1500, 1000)</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
137 |
== Functions to get gear properties == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
138 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
139 |
=== <tt>!GetGearType(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
140 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
141 |
<blockquote>returns one of [GearTypes Gear Types] for the specified gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
142 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
143 |
=== <tt>!GetGearPosition(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
144 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
145 |
<blockquote>returns tuple of x,y coordinates for the specified gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
146 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
147 |
=== <tt>!GetHogClan(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
148 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
149 |
<blockquote>returns the clan id of the specified hedgehog gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
150 |
</blockquote> |
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
151 |
=== <tt>!GetHogTeamName(gearUid)</tt> === |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
152 |
|
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
153 |
<blockquote>returns the name of the specified hedgehog gear's team |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
154 |
</blockquote> |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
155 |
=== <tt>!GetHogName(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
156 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
157 |
<blockquote>returns the name of the specified hedgehog gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
158 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
159 |
=== <tt>GetX(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
160 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
161 |
<blockquote>returns x coordinate of the gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
162 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
163 |
=== <tt>GetY(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
164 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
165 |
<blockquote>returns y coordinate of the gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
166 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
167 |
=== <tt>!GetState(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
168 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
169 |
<blockquote>returns the state of the gear. This is one of [States] |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
170 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
171 |
=== <tt>!GetFollowGear(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
172 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
173 |
<blockquote>Returns the uid of the gear that is currently being followed. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
174 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
175 |
=== <tt>!GetTimer(gearUid)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
176 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
177 |
<blockquote>returns the timer of the gear. This is for example the time it takes for watermelon, mine, etc. to explode. This is also the time used to specify the blowtorch or rcplane time. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
178 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
179 |
=== <tt>!GetHealth(gearUid)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
180 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
181 |
<blockquote>returns the health of the gear |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
182 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
183 |
=== <tt>!GetBotLevel(gearUid)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
184 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
185 |
<blockquote>returns the bot level from 0 to 5. 0 means human player. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
186 |
</blockquote> |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
187 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
188 |
=== <tt>!GetVisualGearValues(vgUid)</tt> === |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
189 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
190 |
<blockquote>This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
191 |
X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
192 |
X, Y typically position, dX, dY typically speed, Angle is usually the rotation angle, Frame is typically the animation frame, FrameTicks is usually an animation counter. State can have a variety of values, but is typically bit packed, Timer is usually the gear lifetime and Tint is the colour. |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
193 |
Most visual gears require little to no modification of parameters. |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
194 |
</blockquote> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
195 |
Example: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
196 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
197 |
<code lang="lua"> !GetVisualGearValues(vgUid) -- return visual gear values |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
198 |
</code> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
199 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
200 |
== Functions to modify gears == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
201 |
|
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
202 |
=== <tt>!DeleteGear(gearUid)</tt> === |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
203 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
204 |
<blockquote>Deletes a Gear</blockquote> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
205 |
Example: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
206 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
207 |
<code lang="lua"> gear = !AddGear(…) |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
208 |
!DeleteGear(gear) -- Delete the newly created gear.</code> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
209 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
210 |
=== <tt>!DeleteVisualGear(vgUid)</tt> === |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
211 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
212 |
<blockquote>Deletes a Visual Gear. Note, most visual gears delete themselves.</blockquote> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
213 |
Example: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
214 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
215 |
<code lang="lua"> vgear = !AddVisualGear(…) |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
216 |
!DeleteVisualGear(vgear) -- Delete the newly created visual gear.</code> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
217 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
218 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
219 |
=== <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint)</tt> === |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
220 |
|
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
221 |
<blockquote>This allows manipulation of many of the visual gear values. Calling GetVisualGearValues first is recommended on most visual gears unless you are controlling all the key values. In the case of vgtCircle, the visual gear values are mapped as follows. X, Y: position. State: radius. Timer: Thickness. FrameTicks: pulsation speed (0 to disable). dX, dY: min/max pulsation opacity (0-255). Tint: colour, RGBA. |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
222 |
Most visual gears require little to no modification of parameters. |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
223 |
</blockquote> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
224 |
Example: |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
225 |
|
51
5ab1cf4c7194
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
50
diff
changeset
|
226 |
<code lang="lua"> -- set a circle to position 1000,1000 pulsing from opacity 20 to 200 (8%-78%), radius of 50, 3px thickness, bright red. |
5ab1cf4c7194
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
50
diff
changeset
|
227 |
!SetVisualGearValues(circleUid, 1000,1000, 20, 200, 0, 0, 100, 50, 3, 0xff0000ff) |
39
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
228 |
</code> |
45a576e56425
Updating with visual gear functions and delete gear
kyberneticist
parents:
38
diff
changeset
|
229 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
230 |
=== <tt>!FindPlace(gearUid, fall, left, right)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
231 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
232 |
<blockquote>Finds a place for the specified gear between x=left and x=right and places it there. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
233 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
234 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
235 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
236 |
<code lang="lua"> gear = !AddGear(…) |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
237 |
!FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
238 |
=== <tt>!SetGearPosition(gearUid, x, y)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
239 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
240 |
<blockquote>Places the specified gear exactly at the position (x,y). |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
241 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
242 |
=== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
243 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
244 |
<blockquote>This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the onAmmoStoreInit() even handler. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
245 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
246 |
Example: |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
247 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
248 |
<code lang="lua"> !SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
249 |
!SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade</code> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
250 |
=== <tt>!SetHealth(gearUid, health)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
251 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
252 |
<blockquote>Sets the health of the specified gear. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
253 |
</blockquote> |
48
3c5d26c1562a
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
47
diff
changeset
|
254 |
=== <tt>!SetEffect(gearUid, effect, true/false)</tt> (0.9.14 / dev) === |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
255 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
256 |
<blockquote>Enables (true) or disables (false) one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned</tt> for the specified hedgehog gear. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
257 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
258 |
Example: (sets all bots poisoned) |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
259 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
260 |
<code lang="lua"> function onGearAdd(gear) |
48
3c5d26c1562a
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
47
diff
changeset
|
261 |
if (!GetGearType(gear) == gtHedgehog) and (!GetBotLevel(gear) > 0) then |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
262 |
!SetEffect(gear, hePoisoned, true) |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
263 |
end |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
264 |
end</code> |
48
3c5d26c1562a
Edited wiki page LuaAPI through web user interface.
RedGrinner
parents:
47
diff
changeset
|
265 |
Notice: In 0.9.14 this function takes 0 or 1 instead of true/false. |
17 | 266 |
=== <tt>CopyPV(gearUid, gearUid)</tt> === |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
267 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
268 |
<blockquote>This sets the position and velocity of the second gear to the first one. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
269 |
</blockquote> |
17 | 270 |
=== <tt>CopyPV2(gearUid, gearUid)</tt> === |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
271 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
272 |
<blockquote>This sets the position of the second gear to that of the first one, but makes its velocity twice the one of the first. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
273 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
274 |
=== <tt>!FollowGear(gearUid)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
275 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
276 |
<blockquote>Makes the gameclient follow the specifiec gear. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
277 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
278 |
=== <tt>!SetState(gearUid, state)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
279 |
|
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
280 |
<blockquote>Sets the state of the specified gear to one of [States]. |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
281 |
</blockquote> |
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
282 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
283 |
=== <tt>!SetTag(gearUid, tag)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
284 |
|
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
285 |
<blockquote>Sets the tag of the specified gear, different for every gear. |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
286 |
</blockquote> |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
287 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
288 |
=== <tt>!SetTimer(gearUid, timer)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
289 |
|
13 | 290 |
<blockquote>Sets the timer of the specified gear. Also see !GetTimer. |
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
291 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
292 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
293 |
== Other Functions == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
294 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
295 |
=== <tt>!EndGame()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
296 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
297 |
<blockquote>Makes the game end. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
298 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
299 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
300 |
=== <tt>!ParseCommand(string)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
301 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
302 |
<blockquote>Makes the gameclient parse the specified custom command. |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
303 |
</blockquote> |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
304 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
305 |
=== <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
306 |
|
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
307 |
<blockquote>Use to tell the player what he is supposed to do. |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
308 |
</blockquote> |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
309 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
310 |
=== <tt>!HideMission()</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
311 |
|
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
312 |
<blockquote>Hides the mission. |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
313 |
</blockquote> |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
314 |
|
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
315 |
=== <tt>!AddCaption(text)</tt> (0.9.14) === |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
316 |
|
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
317 |
<blockquote>Display event text in the upper part of the screen. |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
318 |
</blockquote> |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
319 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
320 |
=== <tt>!PlaySound(soundId)</tt> === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
321 |
|
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
322 |
<blockquote>Plays the specified sound. |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
323 |
</blockquote> |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
324 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
325 |
=== <tt>!SetZoom(zoomLevel)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
326 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
327 |
<blockquote>Sets the zoom level. The value for maximum zoom is currently 1.0 and for minimum 3.0 The default zoom level is 2.0 |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
328 |
</blockquote> |
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
329 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
330 |
=== <tt>!GetZoom()</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
331 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
332 |
<blockquote>Returns the current zoom level |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
333 |
</blockquote> |
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
334 |
|
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
335 |
=== <tt>!GetRandom(number)</tt> (0.9.14) === |
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
336 |
|
43 | 337 |
<blockquote>Returns a randomly generated number in the range of 0 to number - 1. This random number uses the game seed, so is synchronised, and thus safe for multiplayer and saved games. Use GetRandom for anything that could impact the engine state. For example, a visual gear can use the Lua random, but adding a regular gear should use GetRandom. |
28
026591d95ac6
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
24
diff
changeset
|
338 |
</blockquote> |
38
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
339 |
|
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
340 |
=== <tt>!SetWind(windSpeed)</tt> (development) === |
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
341 |
|
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
342 |
<blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control. |
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
343 |
</blockquote> |
123cc75cbe6a
Edited wiki page LuaAPI through web user interface.
henrik.rostedt
parents:
28
diff
changeset
|
344 |
|
12
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
345 |
== Debugging Functions == |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
346 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
347 |
=== <tt>!WriteLnToConsole(string)</tt> (0.9.14) === |
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
348 |
|
74ead59b6c64
LuaAPI page + GearTypes,AmmoTypes,Sounds,States listing pages
Tobias Neumann <mail@tobias-neumann.eu>
parents:
diff
changeset
|
349 |
<blockquote>Guess :D |
13 | 350 |
</blockquote> |