changeset 869 | a09b1abfe5e8 |
parent 866 | e8d5c66477b7 |
child 871 | 3222b4cfef8a |
868:0b400b3e05cc | 869:a09b1abfe5e8 |
---|---|
921 |
921 |
922 ==== <tt>!TestRectForObstacle(x1, y1, x2, y2, landOnly) (0.9.16) </tt> ==== |
922 ==== <tt>!TestRectForObstacle(x1, y1, x2, y2, landOnly) (0.9.16) </tt> ==== |
923 Checks the rectangle between the given coordinates for possible collisions. Set `landOnly` to `true` if you don’t want to check for collisions with gears (hedgehogs, etc.). |
923 Checks the rectangle between the given coordinates for possible collisions. Set `landOnly` to `true` if you don’t want to check for collisions with gears (hedgehogs, etc.). |
924 |
924 |
925 ==== <tt>!PlaceGirder(x, y, state)</tt> (0.9.16) ==== |
925 ==== <tt>!PlaceGirder(x, y, state)</tt> (0.9.16) ==== |
926 Places a girder with centre points `x`, `y` and a certain length and orientation, specified by `state`. |
926 Attempts to place girder with centre points `x`, `y` and a certain length and orientation, specified by `state`. The girder can only be placed in open space and must not collide with anything so this function may fail. It will return `true` on successful placement and `false` on failure. |
927 |
927 |
928 These are the accepted states: |
928 These are the accepted states: |
929 |
929 |
930 || *`state`* || *Length* || *Orientation* || |
930 || *`state`* || *Length* || *Orientation* || |
931 || 0 || short || horizontal || |
931 || 0 || short || horizontal || |
936 || 5 || long || decreasing right || |
936 || 5 || long || decreasing right || |
937 || 6 || long || vertical || |
937 || 6 || long || vertical || |
938 || 7 || long || increasing right || |
938 || 7 || long || increasing right || |
939 |
939 |
940 ==== <tt>!PlaceSprite(x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert, [, landFlag, ...])</tt> ==== |
940 ==== <tt>!PlaceSprite(x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert, [, landFlag, ...])</tt> ==== |
941 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. The placement may fail, for example if the sprite goes too far out of the land boundaries. The function returns `true` if the placement was successful, `false` otherwise. |
941 Places a [Sprites sprite] at the specified position (`x`, `y`) on the map, it behaves like terrain then. Unlike `PlaceGirder`, this function does not check for collisions, so the sprite can be placed anywhere within map boundaries. The function returns `true` if the placement was successful, `false` otherwise. `frameIdx` is the frame index starting by 0. `frameIdx` is used if the sprite consists of several sub-images. Only a subset of the sprites is currently supported by this function: |
942 `frameIdx` is used if the sprite consists of several sub-images. Only a subset of the sprites is currently supported by this function: |
|
943 |
942 |
944 * `sprAmGirder` |
943 * `sprAmGirder` |
945 * `sprAmRubber` |
944 * `sprAmRubber` |
946 * `sprAMSlot` |
945 * `sprAMSlot` |
947 * `sprAMAmmos` |
946 * `sprAMAmmos` |