<- PRPL reference <- Units

CreateEmergent

ArgumentsResultNotation
X pixel coord, Y pixel coord, isEnemy none [ f1 f2 b1 - ]

Description

Creates a new emergent at the specified pixel coordinates f1,f2. Note that if these pixel coordinates do not correspond to integer map cells, the guidance (the weighted random wandering) may fail, leaving the emergent to continue in one direction, reversing only when it reaches the boundary of the map. To get around this, call PixelToCell CellToPixel on your coordinates to make sure they match. If b1 is false (0), the spawned emergent will be benign, else it will be enemy.

Unlike CreateUnit, this command does not return a UID of the created unit.

Examples

# spawn a benign emergent at the mouse cursor
CreateEmergent(GetMouseCell CellToPixel 0)