This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
crpl:docs:createunit [2013/01/18 12:56] – grauniad | crpl:docs:createunit [2018/09/25 00:04] – added a note where to find all the variables of regular units changeable by setscriptvar to clarify the example Grabz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION~~ | ||
<- [[crpl: | <- [[crpl: | ||
===== CreateUnit | ===== CreateUnit | ||
Line 8: | Line 7: | ||
=== 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 | + | |
- | * BERTHA | + | |
- | * POWERZONE | + | |
- | * OREDEPOSIT | + | |
- | * ENERGYDEPOSIT0 | + | |
- | * ENERGYDEPOSIT1 | + | |
- | * ENERGYDEPOSIT2 | + | |
- | * ENERGYDEPOSIT3 | + | |
=== 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 | ||
+ | </ |