LuaAPI.wiki
changeset 539 7173ac8996f9
parent 538 1ee51018a898
child 540 b41b9305be9f
equal deleted inserted replaced
538:1ee51018a898 539:7173ac8996f9
   782 || 4 || long || horizontal ||
   782 || 4 || long || horizontal ||
   783 || 5 || long || decreasing right ||
   783 || 5 || long || decreasing right ||
   784 || 6 || long || vertical ||
   784 || 6 || long || vertical ||
   785 || 7 || long || increasing right ||
   785 || 7 || long || increasing right ||
   786 
   786 
       
   787 ==== <tt>!PlaceSprite(x, y, sprite, frameIdx, ...)</tt> ====
       
   788 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:
       
   789 
       
   790  * `sprAmGirder`
       
   791  * `sprAmRubber`
       
   792  * `sprAMSlot`
       
   793  * `sprAMAmmos`
       
   794  * `sprAMAmmosBW`
       
   795  * `sprAMCorners`
       
   796  * `sprHHTelepMask`
       
   797  * `sprTurnsLeft`
       
   798  * `sprSpeechCorner`
       
   799  * `sprSpeechEdge`
       
   800  * `sprSpeechTail`
       
   801  * `sprThoughtCorner`
       
   802  * `sprThoughtEdge`
       
   803  * `sprThoughtTail`
       
   804  * `sprShoutCorner`
       
   805  * `sprShoutEdge`
       
   806  * `sprShoutTail`
       
   807  * `sprSnow`
       
   808  * `sprBotlevels`
       
   809  * `sprIceTexture`
       
   810  * `sprCustom1`
       
   811  * `sprCustom2`
       
   812 
       
   813 The 5th and later arguments specify land flags (see data types) to be used for the newly created terrain. If omited, `lfNormal` is assumed.
       
   814 
       
   815 Example:
       
   816 
       
   817 <code language="lua">PlaceSprite(2836, 634, sprAmGirder, 5, lfNormal)
       
   818 -- Places the girder sprite as normal terrain at (2836, 634). The `frameIdx` 5 is for the long decreasing right girder.</code>
       
   819 <code language="lua">PlaceSprite(1411, 625, sprAmRubber, 1, lfBouncy)
       
   820 -- Places the rubber band sprite as bouncy terrain at (2836, 634). The `frameIdx` 1 is for the decreasing right rubber band.</code>
       
   821 
   787 ==== <tt>!AddPoint(x, y [, width [, erase] ])</tt> (0.9.21) ====
   822 ==== <tt>!AddPoint(x, y [, width [, erase] ])</tt> (0.9.21) ====
   788 This function is used to draw your own maps using Lua. The maps drawn with this are of type “hand-drawn”.
   823 This function is used to draw your own maps using Lua. The maps drawn with this are of type “hand-drawn”.
   789 
   824 
   790 The function takes a `x`,`y` location, a `width` (means start of a new line) and `erase` (if `false`, this function will draw normally, if `true`, this function will erase drawn stuff).
   825 The function takes a `x`,`y` location, a `width` (means start of a new line) and `erase` (if `false`, this function will draw normally, if `true`, this function will erase drawn stuff).
   791 
   826