Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function XYZRandomizer2() -- generates a xyz around corpse, put your corpse location here (x,y,z) and put the res radius in r
- -- some way to get your coprse location
- local corpseX = 60;
- local corpseY = 70;
- local resRadius = 20;
- -- randomize theta (the angle) and bound the distance to the range of the resRadius
- local randDist = resRadius / math.random(1,100)
- local randTheta = 2*math.pi / math.random(1,100)
- ResTryX, ResTryY = corpseX + randDist*math.cos(randTheta), corpseY + randDist*math.sin(randTheta)
- ToConsole("ResTryX: " .. ResTryX .. " ResTryY: " .. ResTryY);
- end
- XYZRandomizer2();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement