<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] ===== GetUnitType ===== ^Arguments^Result^Notation^ | UID | Type | [ int - string ] | === Description === Takes a unit UID and returns a string of the type of the corresponding unit. Useful for myriad things where you need only a certain type of unit. See also: [[.:unittypelist|List of unit types]] === Examples === CurrentCoords 10000 1 GetAllUnitsInRange ->MapUnits <-MapUnits GetListCount 0 do <-MapUnits[I] ->Unit "Unit:" <-Unit "is" <-Unit GetUnitType <-Unit GetUnitIsEnemy if "(Enemy)" else "(Ally)" endif Trace5 loop