This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:destroy [2014/10/01 19:02] – external edit 127.0.0.1 | crpl:docs:destroy [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== Destroy | ===== Destroy | ||
| ^ Arguments ^ Result ^ Notation ^ | ^ Arguments ^ Result ^ Notation ^ | ||
| - | |Unit UID to Destroy, Explosion Mode (0,1,2,3)| |%%n1 n2--%%| | + | |Unit UID to Destroy, Explosion Mode (0,1,2,3)| |'' |
| Line 13: | Line 13: | ||
| For the explosion mode argument, | For the explosion mode argument, | ||
| 1 means a small soundless flash, 2 means a full explosion with sound, 3 means full explosion but no sound. | 1 means a small soundless flash, 2 means a full explosion with sound, 3 means full explosion but no sound. | ||
| + | |||
| + | **Note:** If Destroy is called on SELF, the script will stop at that line. Any code after won't be executed. | ||
| + | |||
| + | <color # | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| $targetX:0 | $targetX:0 | ||
| $targetY:0 | $targetY:0 | ||
| Line 31: | Line 35: | ||
| SetCreeper(CurrentCoords < | SetCreeper(CurrentCoords < | ||
| endif | endif | ||
| + | |||
| + | # Gets around the bug with guppies and works for other units as well | ||
| + | : | ||
| + | -> | ||
| + | ->SD_Uid | ||
| + | StackSize -> | ||
| + | -1 -1 # extra pair of arguments to be consumed if needed | ||
| + | <-SD_Uid < | ||
| + | StackSize < | ||
| + | pop | ||
| + | loop | ||
| </ | </ | ||