Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Calling Random Numbers
#1
I'm working on building a D&D styled battle system, and i need to know how to call random numbers from a specific range. for example, to hit with an attack, the basic formula goes like this:

if d20 + Actor strength mod + BAB > target AC
Hit
Else
Miss

I know this isn't proper code, but i'm still working on it. anyways, where it says d20, i need it to call a random number from 1-20. i'll add Critical functionality later, but for now, this is it.


Reply }


Messages In This Thread
Calling Random Numbers - by Alistor - 09-06-2013, 07:46 PM
RE: Calling Random Numbers - by DerVVulfman - 09-07-2013, 03:14 AM
RE: Calling Random Numbers - by MechanicalPen - 09-07-2013, 06:09 PM
RE: Calling Random Numbers - by DerVVulfman - 09-08-2013, 12:27 AM
RE: Calling Random Numbers - by MechanicalPen - 09-08-2013, 01:02 AM
RE: Calling Random Numbers - by DerVVulfman - 09-08-2013, 03:09 AM
RE: Calling Random Numbers - by MechanicalPen - 09-08-2013, 06:16 PM
RE: Calling Random Numbers - by DerVVulfman - 09-08-2013, 08:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Making Forest Maps with the Random Map Generator ShadowIce 16 19,662 02-02-2014, 08:18 PM
Last Post: ShadowIce
   Help Making Random Maps ShadowIce 0 2,997 02-02-2010, 03:28 PM
Last Post: ShadowIce
   Calling Scripts aistinger 3 5,333 12-03-2009, 01:41 AM
Last Post: aistinger
   Random Monster Groups Yin 25 28,073 08-18-2009, 06:04 AM
Last Post: DerVVulfman



Users browsing this thread: