razthehedgehog Posted July 10, 2006 Report Share Posted July 10, 2006 Say i have a counter, and i want subtract from it an amount between 1-5, how would i go about this? Link to comment Share on other sites More sharing options...
ssbfalcon Posted July 10, 2006 Report Share Posted July 10, 2006 you'll need to use the random number function. just do: subtract from counter -> random(4)+1 and that should work Link to comment Share on other sites More sharing options...
Slingerland Posted July 10, 2006 Report Share Posted July 10, 2006 Hey, raz. Make a new event. Then, in the grid area, scroll over to your counter that you made and right click in its column and select "subtract from counter" and select your value. Now, since you want a value from 1-5 to be subtracted, type in: random(4)+1 This way it'll select a value from 0-4, then add one to that value, making it your desired 1-5. EDIT: man, every time I type in the help forum, somebody answers the question while I'm typing...curse you Ssb! XD Link to comment Share on other sites More sharing options...
ssbfalcon Posted July 10, 2006 Report Share Posted July 10, 2006 XD Well you can get your revenge by playing me in Hunters... *scrambles for DS to put code in sig* Link to comment Share on other sites More sharing options...
razthehedgehog Posted July 10, 2006 Author Report Share Posted July 10, 2006 Ok, say i wanted a value between 7 and 9, how would i do that? Link to comment Share on other sites More sharing options...
ssbfalcon Posted July 10, 2006 Report Share Posted July 10, 2006 You'd do random(3)+7 Here's a general formula. just do random(max-min)+min where in this case min=7 and max=9 Link to comment Share on other sites More sharing options...
Recommended Posts