# How do I create a multiple dice app with different die (D6, D8, D10, D12, D20?)

**URL:** <https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222>\
**Category:** Questions about Thunkable X\
**Created:** [January 2, 2022, 9:13pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222 "2022-01-02T21:13:32Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 2, 2022, 9:13pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/1 "2022-01-02T21:13:32Z")

</div>

Hello all,  
I wanted to create an app that can do three things:

1. Use different types of dice 6, 8, 10, 12, and 20 sided and use multiple die, not a single die.
2. Select a random tank, soldier, monster card image at random
3. Award random experience points or gold pieces (depending on the game)

I want to play RPG games and wargames solo. I live in a remote area and there aren’t players near me so this way the app works like a GM/DM

Can someone help me make this? I’m brand new and made a single die app but can’t figure out multiple die rolls, the random picture with hit points and info is easy, I think.  
Thanks

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 2, 2022, 10:44pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/2 "2022-01-02T22:44:49Z")

</div>

Hi and Welcome to Thunkable!

I just made a 4-sided die roller, which is similar to what you already created.

1. To create multiple die rolls, just use that same function/set of blocks but run it again and assign the resulting value to a different label (or variable).
2. You’ll need to explain more about how this related to #1, if at all.
3. You’ll need to explain more about how this related to #1 and #2, if at all.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 2, 2022, 10:58pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/3 "2022-01-02T22:58:21Z")

</div>

Here’s a demo (find the screen with your username):

[https://x.thunkable.com/copy/60fb37b5742e8bc58525655a491228cd](https://x.thunkable.com/copy/60fb37b5742e8bc58525655a491228cd)

![dice_roll_AdobeCreativeCloudExpress](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/27b3d3ff6b0cd0785cd0d3cfbed3f8811740cb6f.gif)

This video shows one way to make a list of images and pick a random one:

[![](https://img.youtube.com/vi/UNgelHHnHYw/maxresdefault.jpg "Make a Code Monday: Build a Dice Roll App with Thunkable") ](https://www.youtube.com/watch?v=UNgelHHnHYw)

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 2, 2022, 11:34pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/4 "2022-01-02T23:34:00Z")

</div>

Thanks. I used that video for the first die app. I’ll try but I don’t think I understand. I’m really new.  
Mike

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 2, 2022, 11:39pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/5 "2022-01-02T23:39:03Z")

</div>

Okay, I opened blocks and see how that works. I wanted to do an if/then  
if 3d6 then 1-18. if 2d6, then 1-12 where I enter number of dice and type - like this picture (my version of a flow chart).

 ![app-main](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/08b3c12a1a14172cd324ed0b2fd4b2f7dfb974b4.png)

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 2, 2022, 11:41pm UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/6 "2022-01-02T23:41:13Z")

</div>

Okay, I opened blocks and see how that works. I wanted to do an if/then  
if 3d6 then 1-18. if 2d6, then 1-12 where I enter the number of die and type - like this picture (my version of a flow chart).

 ![app-main](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/08b3c12a1a14172cd324ed0b2fd4b2f7dfb974b4.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 3, 2022, 12:13am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/7 "2022-01-03T00:13:34Z")

</div>

You can do that with two List Viewers. The first would have the number of sides and the second would have the quantity.

Then you use the green “item” blocks to transfer the values to your expressions that generate the roll values.

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 12:25am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/8 "2022-01-03T00:25:54Z")

</div>

Can you show me an example? I’m not understanding too well.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 3, 2022, 12:43am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/9 "2022-01-03T00:43:01Z")

</div>

Take a look at the updated screen from that same project:

[Thunkable](https://x.thunkable.com/copy/02f0a356d2bcc71360b81e8612eb5f48) (wrong link)

[https://x.thunkable.com/copy/2b31fd458cd1d91e91ae80913f4fcf56](https://x.thunkable.com/copy/2b31fd458cd1d91e91ae80913f4fcf56)

I’ve set it up so that the variable values are assigned based on what the user clicks in each List Viewer. Those variables could then be used to create each roll using a loop based on the number of dice and a random number block from 1 to the number of sides.

If you’re new to programming, this is going to take some time to create.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5d79a2490ff5a79be8bacc2815f86025e633cf4.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 3, 2022, 12:49am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/10 "2022-01-03T00:49:04Z")

</div>

I updated the link after I posted it just now so if you clicked immediately, you may see code that doesn’t quite work. Try it now and it should be fine.

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 12:54am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/11 "2022-01-03T00:54:53Z")

</div>

Thank you for the assist. Checking it out now

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 12:57am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/12 "2022-01-03T00:57:37Z")

</div>

It’s not letting me select the dice or number

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 1:00am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/13 "2022-01-03T01:00:43Z")

</div>

Okay, it’s weird. It says I chose to roll 8-8sided dice but there’s only 3… Hmmmm Interesting

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 1:08am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/14 "2022-01-03T01:08:23Z")

</div>

I think it’s confusing the number of dice with the number of sides. I’m getting 20-20, 6-6 etc in the summary

 ![Screenshot_3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/e/3e57ce798fa9493da98fdc47e3b6f4bf11dc7984.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 3, 2022, 2:02am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/15 "2022-01-03T02:02:13Z")

</div>

My apologies! I accidentally posted the old link again. Please try this one:

[https://x.thunkable.com/copy/2b31fd458cd1d91e91ae80913f4fcf56](https://x.thunkable.com/copy/2b31fd458cd1d91e91ae80913f4fcf56)

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 2:06am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/16 "2022-01-03T02:06:37Z")

</div>

I see it now. Where’s the numbers from the die? Am I missing something or do I create the die roll feature like before?  
Thanks again.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 3, 2022, 2:08am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/17 "2022-01-03T02:08:09Z")

</div>

I didn’t create the full project. This is just more of a starter to give you an idea of how to let the user select each value.

The two demos on that screen are not yet connected in any way.

---

<div class="post-metadata">

**Author:** ![MichaelAt](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/michaelat/32/123691_2.png) [@MichaelAt](https://community.thunkable.com/u/MichaelAt)\
**Post date:** [January 3, 2022, 2:38am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/18 "2022-01-03T02:38:28Z")

</div>

Yeah, I figured that out. Here’s what I made but I can’t seem to get the monster pictures to open and be scrollable. [https://x.thunkable.com/copy/b25daccc86fe2202e138825ff03c94c1](https://x.thunkable.com/copy/b25daccc86fe2202e138825ff03c94c1)

I’ll have to try yours tomorrow and see if I can get the screen to expand and show the die numbers.

I really appreciate your help. For my first time, I think I did okay. Can I actually turn this into an app I use on my phone or for retail in the app store?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 3, 2022, 2:39am UTC](https://community.thunkable.com/t/how-do-i-create-a-multiple-dice-app-with-different-die-d6-d8-d10-d12-d20/1664222/19 "2022-04-03T02:39:00Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
