This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
prpl:getunittype [2016/12/21 04:30] – Oblivion | prpl:getunittype [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
<- [[.: | <- [[.: | ||
- | ===== | + | ===== |
^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
- | | Unit UID| String| [ - ] | | + | | UID | Type | [ int - string |
=== Description === | === 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: [[.: | ||
=== Examples === | === Examples === | ||
- | < | + | < |
- | stack.Push(new Data(unit.gameObject.name)); | + | CurrentCoords 10000 1 GetAllUnitsInRange -> |
- | stack.Push(new Data("")); | + | |
- | + | < | |
+ | < | ||
+ | |||
+ | " | ||
+ | |||
+ | <-Unit GetUnitIsEnemy if | ||
+ | "(Enemy)" | ||
+ | | ||
+ | | ||
+ | endif | ||
+ | |||
+ | Trace5 | ||
+ | loop | ||
</ | </ | ||