Author Topic: Dungeons and Dragons  (Read 5267 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #15 on: December 03, 2011, 07:56:51 pm »
Axe does order of operations from left to right, no questions asked (outside of parenthesis) . If you want a number from 1-20, you should do rand^20+1

EDIT: and Rand^21 will give you a number from 0-20
« Last Edit: December 03, 2011, 07:57:24 pm by Builderboy »

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Dungeons and Dragons
« Reply #16 on: December 03, 2011, 07:58:19 pm »
*Face slap*...that is to my face lol
« Last Edit: December 03, 2011, 07:58:42 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #17 on: December 03, 2011, 07:58:54 pm »
Do you know what the ^ operator does?

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Dungeons and Dragons
« Reply #18 on: December 03, 2011, 07:59:09 pm »
I was about to say that (except the first part :P) but you ninja'd me.

Still, I'm sometimes unsure so sometimes I end up using probably more parentheses then I need to D:

Edit: Responding to builderboy's post 2 posts above :P
« Last Edit: December 03, 2011, 08:00:04 pm by epic7 »

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Dungeons and Dragons
« Reply #19 on: December 03, 2011, 08:01:34 pm »
WAIT back to the original point, rand^19 is still 20 numbers! so if you are setting something to chance, it doesn't matter what numbers you use!
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Dungeons and Dragons
« Reply #20 on: December 03, 2011, 08:02:13 pm »
0-19 is 20 numbers (with rand^20), but if you specificly need 1-20, add a +1
« Last Edit: December 03, 2011, 08:46:01 pm by epic7 »

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Dungeons and Dragons
« Reply #21 on: December 03, 2011, 08:02:48 pm »
0-19 is 20 numbers, but if you specificly need 1-20, add a +1

Theres your answer obon7! Good luck :)
« Last Edit: December 03, 2011, 08:03:09 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #22 on: December 03, 2011, 08:39:08 pm »
WAIT back to the original point, rand^19 is still 20 numbers!

It is not, that gives you 0-18, which is 19 numbers. 

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Dungeons and Dragons
« Reply #23 on: December 03, 2011, 08:44:54 pm »
But axe counts from 0, so 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
There are 20 numbers! 0 counts with axe! right?
« Last Edit: December 03, 2011, 08:45:04 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Dungeons and Dragons
« Reply #24 on: December 03, 2011, 08:45:42 pm »
But rand^19 counts 0 as a number

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #25 on: December 03, 2011, 08:47:37 pm »
rand^19 cannot give you the number 19, it can only produce numbers 0-18.  Try it if you don't believe me.  Rand^19 produces *only* 19 different numbers, *including* zero
« Last Edit: December 03, 2011, 08:49:54 pm by Builderboy »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Dungeons and Dragons
« Reply #26 on: December 03, 2011, 08:48:35 pm »
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 is 19 numbers. Rand^19 chooses from 19 numbers

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #27 on: December 03, 2011, 08:49:45 pm »
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 is 19 numbers. Rand^19 chooses from 19 numbers
Exactly

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Dungeons and Dragons
« Reply #28 on: December 03, 2011, 08:52:22 pm »
Ahh, I get it! I was lead to believe that is includes 19! Thanks :)

So then could it still just be rand^20?
« Last Edit: December 03, 2011, 08:52:59 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dungeons and Dragons
« Reply #29 on: December 03, 2011, 08:53:09 pm »
Lol now that we have that sorted out, we can get back on topic :P