Inaccuracy

i need an inaccuracy script.

for what?

basicly i need a empty to rotate a small, random ammount every time a button is pressed and i need to be able to adjust the ammount it rotates

I DID NOTMAKE THIS!!!

import math
con=GameLogic.getCurrentController()
own=con.getOwner()

j=math.tan(own.ang/180*math.pi)
p=GameLogic.getRandomFloat()*2*math.pi
r=GameLogic.getRandomFloat()*j



x=math.sin(p)*r
y=math.cos(p)*r










own.setOrientation([[1,x,0],[-x,1,-y],[0,y,1]])

I DID NOT MAKE THIS!!!

hope it helps!

exactly what i needed, thanks