XCess 0 Posted February 24, 2006 Just a lil question. How can you randomly select a number between a range starting at a negative number and ending at a positive. For example: between -100 and +100. I know random 100 would select a number between 0 and 100 but how do you start the range below 0? I know this is possible because I made an artillery script about three years ago using a negative to positive selection range. **edit** I think i've got it: random(100)-100 but I'm not a hundred percent sure. Could someone clarify it for me? Thanks in advance Share this post Link to post Share on other sites
sanctuary 19 Posted February 24, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(random 200)-100 Will get you anumber between -100 and 100 Share this post Link to post Share on other sites
XCess 0 Posted February 24, 2006 Thanks Sanctuary. Guess I should solve this. Â hmm, don't see a solve button or anything of the sort. I miss ofpec!! Share this post Link to post Share on other sites
Nicolas Eymerich 0 Posted February 27, 2006 Quote[/b] ]random(100)-100 _a = - (random(100)) Share this post Link to post Share on other sites
TeRp 1 Posted February 27, 2006 Quote[/b] ]random(100)-100 _a = - (random(100)) that would be always negative.. Sanctuary is right Share this post Link to post Share on other sites