This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:getvoid [2013/01/14 19:03] – created chani | crpl:docs:getvoid [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | TODO | + | |
| + | <- [[crpl: | ||
| + | ===== GetVoid | ||
| + | |||
| + | ^Arguments^Result^Notation^ | ||
| + | |X, Y|0 or 1. |'' | ||
| + | |||
| + | |||
| + | === Description === | ||
| + | If the terrain cell is void space or out of bounds, a 1 is pushed to the stack, 0 otherwise. | ||
| + | === Examples === | ||
| + | Every 2 seconds, find a random non-void coordinate on the map and add 8 creeper on it: | ||
| + | < | ||
| + | GetTimer0 eq0 if | ||
| + | 60 SetTimer0 | ||
| + | |||
| + | 1 -> | ||
| + | |||
| + | while <-isVoid repeat | ||
| + | RandCoords ->y ->x | ||
| + | <-x <-y GetVoid -> | ||
| + | |||
| + | < | ||
| + | <-x <-y 8 AddCreeper | ||
| + | endif | ||
| + | endwhile | ||
| + | endif | ||
| + | </ | ||