I needed to have the search light aim only in a certain arc. (Imagine the man with the light standing in front of a wall and randomly turning and shining it into the wall, not very realistic looking) So, I came up with a script to overcome the whole mathematical issue of 90, 0, 270 etc.. All you have to do is pick 10 possible directions that you would like the searchlight to scan and the script randomly picks one to look at then randomly picks another and another, pausing between scans. It's great for focusing scans on likely avenues of attack, but occasionally scanning elsewhere.