TTL has a limited range. For objects beyond the range of TTL, use an Auto range on the flash, where the light reaching the flash sensor controls the flash durantion. For maximum distance, use the flash in Manual where you'll have to calculate the correct aperture.
For TTL, see the camera manual (TTL Auto Flash Operation) and flash manual. With a TTL auto flash for the camera (e.g., Pentax AF280T or AF400T), you set the ISO on the flash and when the flash is charged, the camera automatically goes to the 1/60 synchronization shutter speed. The only variable is then lens aperture and you can manually select this, based on the distance range on the flash, when the camera is set to Aperture Priority AE or Manual mode. Or, the camera will automatically select the aperture based on the camera ISO setting if you set the lens to A and the camera is in Aperture, Shutter, or Program AE mode.
You can also do TTL outdoor fill flash - set the flash to TTL and the film ISO; set the camera to the film ISO and shutter speed to 1/60; do not use the lens on A. With the flash off, meter the shadows and set the aperture for the correct exposure. Then turn on the flash and change the flash ISO setting by -1, -1.33, or -1.67 stops, depending on how much or little fill flash you want to fill shadows. For example, with 100 speed film, change the flash ISO to 200, 250, or 320 depending on how much fill flash you want. Using 400 ISO film, you can only get -1 stop (flash ISO set to 800).