SC2Mapster.com Wiki

SC2 API / Functions / UnitGetOwner

UnitGetOwner

int UnitGetOwner (unit u);

Player controlling the unit.

Parameters

unit u

Unit to get the controlling player

Return value

int - Player controlling the unit.

  • 0: Fake player that owns all the doodads, minerals ...
  • n: Player n

Examples

Example: Sample Usage
unit u = // Fill ...;
int player = UnitGetOwner(u);

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

Facts

Date created
Mar 13, 2010

Author