# HG changeset patch
# User almikes@aol.com
# Date 1419998386 0
# Node ID 7173ac8996f9ebb10698f3f94b36b97d9505f556
# Parent 1ee51018a898a40498a790bfd123674ffc5b8f34
Add PlaceSprite
diff -r 1ee51018a898 -r 7173ac8996f9 LuaAPI.wiki
--- a/LuaAPI.wiki Thu Dec 25 22:40:54 2014 +0000
+++ b/LuaAPI.wiki Wed Dec 31 03:59:46 2014 +0000
@@ -784,6 +784,41 @@
|| 6 || long || vertical ||
|| 7 || long || increasing right ||
+==== !PlaceSprite(x, y, sprite, frameIdx, ...) ====
+Places a [Sprites sprite] at the specified position (`x`, `y`) on the map, it behaves like terrain then. `frameIdx` is the frame index starting by 0. This is used if the sprite consists of several sub-images. Only a subset of the sprites is currently supported by this function:
+
+ * `sprAmGirder`
+ * `sprAmRubber`
+ * `sprAMSlot`
+ * `sprAMAmmos`
+ * `sprAMAmmosBW`
+ * `sprAMCorners`
+ * `sprHHTelepMask`
+ * `sprTurnsLeft`
+ * `sprSpeechCorner`
+ * `sprSpeechEdge`
+ * `sprSpeechTail`
+ * `sprThoughtCorner`
+ * `sprThoughtEdge`
+ * `sprThoughtTail`
+ * `sprShoutCorner`
+ * `sprShoutEdge`
+ * `sprShoutTail`
+ * `sprSnow`
+ * `sprBotlevels`
+ * `sprIceTexture`
+ * `sprCustom1`
+ * `sprCustom2`
+
+The 5th and later arguments specify land flags (see data types) to be used for the newly created terrain. If omited, `lfNormal` is assumed.
+
+Example:
+
+PlaceSprite(2836, 634, sprAmGirder, 5, lfNormal)
+-- Places the girder sprite as normal terrain at (2836, 634). The `frameIdx` 5 is for the long decreasing right girder.
+PlaceSprite(1411, 625, sprAmRubber, 1, lfBouncy)
+-- Places the rubber band sprite as bouncy terrain at (2836, 634). The `frameIdx` 1 is for the decreasing right rubber band.
+
==== !AddPoint(x, y [, width [, erase] ]) (0.9.21) ====
This function is used to draw your own maps using Lua. The maps drawn with this are of type “hand-drawn”.