SC2Mapster.com Wiki

SC2 API / Functions / UnitGetPosition

UnitGetPosition

point UnitGetPosition (unit u);

Position of the unit.

Parameters

unit u

Unit to get the position

Return value

point - Position of the unit

Examples

Example: Sample Usage
unit u = // Fill ... ;

// Get a region around the unit
region r = RegionCircle(UnitGetPosition(u), 10);

// Get a unit group around the unit
unitgroup = AIFindUnits(player, null,
                        UnitGetPosition(u), 10, c_noMaxCount);


// Use the position as an order target
OrderSetTargetPoint(ord, UnitGetPosition(u));

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Mar 13, 2010
Last updated
Mar 13, 2010

Author