falconx1 13 Posted July 15, 2013 was wondering what the ranges are gonna be exactly? im trying to make AI spawn between like min 7.1 - 17 seconds max so game play stay less predictable s will be changed to sleep tho but just asking? s = (7.1+random(9.8)); Share this post Link to post Share on other sites
gn1p 1 Posted July 16, 2013 You cant get it that precise. I would go for: _randomNum = random(10)+7.1; Share this post Link to post Share on other sites
Larrow 2821 Posted July 16, 2013 s = (7.1+random(9.8)); would give you 7.10000 > 16.89999 min = 7.1; max = 17; s = ((random max - min) + min); would give 7.10000 > 16.99999 As per WIKI The sleep precision is given by framerate, the delay given is the minimal delay expected. Share this post Link to post Share on other sites
falconx1 13 Posted July 16, 2013 cool thanks, yea the numbers are pretty close i think any of these will do thanks! Share this post Link to post Share on other sites