This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| prpl:destroyunit [2016/12/21 11:36] – Oblivion | prpl:destroyunit [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| <- [[.: | <- [[.: | ||
| - | ===== | + | ===== | 
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | UID, i1| Unit Destroyed| [ UID, i1 - Result | + | | UID, Mode| | [ UID Mode - ] | | 
| === Description === | === Description === | ||
| Destroys the Unit of the UID it receives, and what to play when destroyed. | Destroys the Unit of the UID it receives, and what to play when destroyed. | ||
| + | Modes: | ||
| 0 - Nothing | 0 - Nothing | ||
| 1 - Explosion Effect | 1 - Explosion Effect | ||
| + | |||
| + | Note: This terminates script execution immediately if the Core carrying a script destroys itself. No statement after DestroyUnit will execute. | ||
| + | |||
| + | Editors note: Testing indicates that this command does not produce a result. This page has been updated to reflect that. | ||
| === Examples === | === Examples === | ||
| < | < | ||
| i1 = GetIntFromStack(); | i1 = GetIntFromStack(); | ||
| - | + | ||
| + | Self 0 DestroyUnit //Destroys itself without effects | ||
| + | Self 1 DestroyUnit //Destroys itself while creating an explosion effect | ||
| </ | </ | ||