This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
crpl:docs:randcoords [2013/01/18 18:17] – grauniad | crpl:docs:randcoords [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION~~ | ||
<- [[crpl: | <- [[crpl: | ||
===== RandCoords | ===== RandCoords | ||
Line 8: | Line 7: | ||
=== Description === | === Description === | ||
- | Pushes two random integers to stack where 0 <= RandNum < Map Width. | + | Pushes two random integers to stack where 0 %%<=%% RandNum < Map Width for the first and 0 %%<=%% RandNum < Map Height for the second. |
=== Examples === | === Examples === | ||
- | < | + | Every second, add 32 creeper to a random cell. |
+ | < | ||
+ | GetTimer0 eq0 if | ||
+ | 30 SetTimer0 | ||
+ | |||
+ | RandCoords 32 AddCreeper | ||
+ | endif | ||
+ | </ | ||