This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
crpl:docs:distance [2019/02/27 01:18] – [Distance] added example Karsten75 | crpl:docs:distance [2024/05/13 14:45] (current) – kaiden | ||
---|---|---|---|
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 | ||
</ | </ | ||