This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:createunit [2013/01/14 19:01] – created chani | crpl:docs:createunit [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | TODO | + | <- [[crpl: |
| + | ===== CreateUnit | ||
| + | |||
| + | ^Arguments^Result^Notation^ | ||
| + | |Unit type, X, Y| Unit UID |'' | ||
| + | |||
| + | |||
| + | === Description === | ||
| + | Creates a unit at the given coordinates of the specified type. | ||
| + | A list of all applicable Unit Types can be found on the following [[crpl: | ||
| + | |||
| + | === 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 | ||
| + | </ | ||