This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:createunit [2013/05/15 19:03] – virgilw | crpl:docs:createunit [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | ||
| <- [[crpl: | <- [[crpl: | ||
| =====  CreateUnit | =====  CreateUnit | ||
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | |Unit Name and coordinates| Unit UID |'' | + | |Unit type, X, Y| Unit UID |'' | 
| === Description === | === Description === | ||
| - | Creates a unit at the specified | + | Creates a unit at the given coordinates of the specified | 
| - | + | A list of all applicable | |
| - | * CRPLCORE | + | |
| - | * COLLECTOR | + | |
| - | * RELAY | + | |
| - | * REACTOR | + | |
| - | * OREMINE | + | |
| - | * SIPHON | + | |
| - | * TERP | + | |
| - | * GUPPY | + | |
| - | * PULSECANNON | + | |
| - | * MORTAR | + | |
| - | * STRAFER | + | |
| - | * BOMBER | + | |
| - | * SPRAYER | + | |
| - | * NULLIFIER | + | |
| - | * SHIELD | + | |
| - | * BEAM | + | |
| - | * SNIPER | + | |
| - | * FORGE | + | |
| - | * BERTHA | + | |
| - | * POWERZONE | + | |
| - | * OREDEPOSIT | + | |
| - | * RESOURCEPACK | + | |
| - | * SHIELDKEY | + | |
| === Examples === | === Examples === | ||
| + | The examples below are using [[crpl: | ||
| + | |||
| < | < | ||
| " | " | ||
| </ | </ | ||
| + | < | ||
| + | # Build an emitter or spore tower at current location. | ||
| + | RandFloat ->rand | ||
| + | if (<-rand lt(0.5)) | ||
| + | CreateUnit(" | ||
| + | SetScriptVar(< | ||
| + | SetScriptVar(< | ||
| + | else | ||
| + | CreateUnit(" | ||
| + | SetScriptVar(< | ||
| + | SetScriptVar(< | ||
| + | SetScriptVar(< | ||
| + | SetScriptVar(< | ||
| + | endif | ||
| + | </ | ||