Yeh and what do you think the unit variable is doing? It certainly is not referring to a player or a string. It refers to the rare unit you create.refer to that unit
If you have "x = 2" then how do you refer to the number 2? Same thing.Why cant I just add normal "create unit" and refer to that unit?
Timer expires
-> Spawn Rare
-> Set unit_var = spawned rare creep
Unit dies
- dying unit = unit_var
-> start timer
X = 0
Pick every unit in (Playable map area) and do (actions)
Loop
If (conditions)
Unit-type of (Picked unit) == Footman
Then (actions)
set X = X + 1
Else (actions)
*nothing*
... return X (X is number of Footmen in map)