I'm trying to use the following code to order a unit with locust to attack a nearby unit
it prints null? YES! (contradictd myself there n accident) but its over and over again. The unit isn't being issued to move at all.
Is it possible or are there any alternatives? the point is that the unit is like a shadow that autoattacks nearby targets.
JASS:
call GroupEnumUnitsInRange(g, GetUnitX(toHide), GetUnitY(toHide), 350, viableTargetFilter)
set u = FirstOfGroup(g)
call print("null?")
if u != null then
call print("yes!")
call IssueTargetOrderById(toHide, 'Aatk', u)
else
call print("no")
endif
it prints null? YES! (contradictd myself there n accident) but its over and over again. The unit isn't being issued to move at all.
Is it possible or are there any alternatives? the point is that the unit is like a shadow that autoattacks nearby targets.