--print("player is closer than structure")

target = nearestPlayer
targetType = nearestPlayer.ClassName
lastLock = tick()
else
target = nearestBuilding
targetType = nearestBuilding.ClassName
lastLock = tick()