This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:self [2013/11/30 18:12] – Clean0nion | crpl:docs:self [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== Self ===== | ===== Self ===== | ||
| Line 10: | Line 10: | ||
| Pushes the unique unit ID (an int) for the current unit to the stack. | Pushes the unique unit ID (an int) for the current unit to the stack. | ||
| === Examples === | === Examples === | ||
| - | < | + | Trace current unit's ID |
| - | < | + | < |
| + | If the unit's ammo is full, destroy it | ||
| + | < | ||
| + | Self CONST_AMMO GetUnitAttribute ->ammo | ||
| + | Self CONST_MAXAMMO GetUnitAttribute -> | ||
| + | |||
| + | <-ammo < | ||
| + | Self CONST_DESTROYMODE GetUnitAttribute -> | ||
| + | |||
| + | Self < | ||
| + | endif | ||
| + | </ | ||
| + | Creates a unit then tells it its creator' | ||
| + | < | ||
| " | " | ||
| - | <-unit " | + | <-unit " |
| - | <-unit " | + | <-unit " |
| + | </ | ||