diff -r 2ef49675d837 -r 0cdebc52edad LuaAPI.wiki --- a/LuaAPI.wiki Thu Dec 30 23:05:20 2010 +0000 +++ b/LuaAPI.wiki Thu Dec 30 23:08:54 2010 +0000 @@ -57,7 +57,7 @@
This function is called on every game tick, i.e. 1000 times a second.
-=== onNewTurn() (dev) === +=== onNewTurn() (0.9.15) ===
This function calls at the start of every turn.
@@ -71,7 +71,7 @@
This function is called when a new gear is deleted. Useful in combination with !GetGearType(gearUid).
-=== onGearDamage(gearUid, damage) (dev) === +=== onGearDamage(gearUid, damage) (0.9.15) ===
This function is called when a gear is damaged.
@@ -84,7 +84,7 @@ !AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage') end end -=== onGearResurrect(gearUid) (dev) === +=== onGearResurrect(gearUid) (0.9.14) ===
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.
@@ -211,7 +211,7 @@
returns the bot level from 0 to 5. 0 means human player.
-=== !GetVisualGearValues(vgUid) (dev) === +=== !GetVisualGearValues(vgUid) (0.9.15) ===
This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint @@ -233,7 +233,7 @@ gear = !AddGear(…) !DeleteGear(gear) -- Delete the newly created gear. -=== !DeleteVisualGear(vgUid) (dev) === +=== !DeleteVisualGear(vgUid) (0.9.15) ===
Deletes a Visual Gear. Note, most visual gears delete themselves.
Example: @@ -242,7 +242,7 @@ !DeleteVisualGear(vgear) -- Delete the newly created visual gear. -=== !SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint) (dev) === +=== !SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint) (0.9.15) ===
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. Most visual gears require little to no modification of parameters. @@ -283,7 +283,7 @@
Places the specified gear exactly at the position (x,y).
-=== !SetGearVelocity(gearUid, dx, dy) (dev) === +=== !SetGearVelocity(gearUid, dx, dy) (0.9.15) ===
Gives the specified gear the velocity of dx, dy.
@@ -376,7 +376,7 @@
Plays the specified sound.
-=== !PlaySound(soundId, gearUid) (dev) === +=== !PlaySound(soundId, gearUid) (0.9.15) ===
Plays the specified sound for the chosen hedgehog's team.
@@ -396,7 +396,7 @@
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.
-=== !SetWind(windSpeed) (dev) === +=== !SetWind(windSpeed) (0.9.15) ===
Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.
@@ -406,7 +406,7 @@
Returns the path to the data directory, used when adding libraries.
-=== !GetClanColor(clan) (dev) === +=== !GetClanColor(clan) (0.9.15) ===
Returns the colour of the chosen clan by its number.