This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
crpl:docs:getwall [2014/01/08 23:17] – [GetWall] Flabort | crpl:docs:getwall [2018/05/01 20:22] – add example Grabz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION~~ | ||
<- [[crpl: | <- [[crpl: | ||
===== GetWall | ===== GetWall | ||
Line 12: | Line 11: | ||
Values in between represent varying degrees of health for the wall. | Values in between represent varying degrees of health for the wall. | ||
=== Examples === | === Examples === | ||
- | < | + | Spawn walls under this unit based on its cell width and cell height. Repair these walls every 10 seconds, effectively making them Crazonium (invincible) walls. |
+ | < | ||
+ | GetTimer0 eq0 if | ||
+ | 300 SetTimer0 | ||
- | === Possible Issues === | + | CurrentX ->x |
- | In one coder' | + | CurrentY ->y |
+ | |||
+ | Self CONST_CELLWIDTH GetUnitAttribute -> | ||
+ | Self CONST_CELLHEIGHT GetUnitAttribute -> | ||
+ | |||
+ | <-cellWidth 2 div ->cellWidthRadius | ||
+ | < | ||
+ | |||
+ | <-y < | ||
+ | <-x < | ||
+ | I J 1 SetWall | ||
+ | loop | ||
+ | loop | ||
+ | endif | ||
+ | </code> |