This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
crpl:docs:getwall [2013/01/14 14:03] – created chani | crpl:docs:getwall [2018/05/01 20:22] – add example Grabz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | TODO | + | <- [[crpl: |
+ | ===== GetWall | ||
+ | |||
+ | ^Arguments^Result^Notation^ | ||
+ | |X, Y|0 to 1 |'' | ||
+ | |||
+ | |||
+ | === Description === | ||
+ | Pushes to the stack the value of the wall at the cell coordinates. | ||
+ | 0 represents no wall and 1 represents a wall of full health. | ||
+ | Values in between represent varying degrees of health for the wall. | ||
+ | === 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 | ||
+ | |||
+ | CurrentX ->x | ||
+ | CurrentY ->y | ||
+ | |||
+ | Self CONST_CELLWIDTH GetUnitAttribute -> | ||
+ | Self CONST_CELLHEIGHT GetUnitAttribute -> | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | <-y < | ||
+ | <-x < | ||
+ | I J 1 SetWall | ||
+ | loop | ||
+ | loop | ||
+ | endif | ||
+ | </ |