This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:distance [2019/02/27 06:18] – [Distance] added example Karsten75 | crpl:docs:distance [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| < | < | ||
| - | # terrain | + | #Terrain |
| + | #Keep in mind modifying terrain on a large scale like this can lag the game badly for a short moment, so not recommended to do this mid-level unless you slow the loops. | ||
| - | 50 -> centerX | + | $radius:30 |
| - | 50 -> centerY | + | $stepWidth: |
| - | 20 -> height | + | $min:1 |
| + | $max:10 | ||
| - | do (< | + | once |
| - | do (<-height | + | CurrentX -> |
| - | < | + | CurrentY -> |
| - | < | + | do (<-radius |
| - | distance( <-x < | + | do (<-radius |
| - | loop | + | < |
| - | loop | + | < |
| + | distance(CurrentCoords | ||
| + | #Finds what height | ||
| + | ceil(< | ||
| + | #Caps the terrain to a minimum of 1 and a maximum of 10. Interestingly, | ||
| + | min(< | ||
| + | SetTerrain(< | ||
| + | loop | ||
| + | loop | ||
| + | endonce | ||
| </ | </ | ||