# How to make a sprite random choice system

**URL:** <https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726>\
**Category:** Arcade\
**Created:** [October 1, 2020, 10:03pm UTC](https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726 "2020-10-01T22:03:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaacreisbr23](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isaacreisbr23/32/1708_2.png) [@isaacreisbr23](https://forum.makecode.com/u/isaacreisbr23)\
**Post date:** [October 1, 2020, 10:03pm UTC](https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726/1 "2020-10-01T22:03:33Z")

</div>

how to call a random sprite for example sprite 1, sprite 2, sprite 3  
choose one of the three and position it somewhere random on the map

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 1, 2020, 10:16pm UTC](https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726/2 "2020-10-01T22:16:29Z")

</div>

Something like this?

 ![Screen Shot 2020-10-01 at 3.14.40 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7555c6bb19f6b79fefcb331e6f4a712eaeb1a123.png)

Here is the same code written using arrays:

 ![Screen Shot 2020-10-01 at 3.16.06 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/4729b1d98c2f6edfd94f54126f77583897615692.png)

---

<div class="post-metadata">

**Author:** ![isaacreisbr23](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isaacreisbr23/32/1708_2.png) [@isaacreisbr23](https://forum.makecode.com/u/isaacreisbr23)\
**Post date:** [October 1, 2020, 10:44pm UTC](https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726/3 "2020-10-01T22:44:55Z")

</div>

yes thanks

---

<div class="post-metadata">

**Author:** ![isaacreisbr23](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isaacreisbr23/32/1708_2.png) [@isaacreisbr23](https://forum.makecode.com/u/isaacreisbr23)\
**Post date:** [October 3, 2020, 6:06pm UTC](https://forum.makecode.com/t/how-to-make-a-sprite-random-choice-system/3726/4 "2020-10-03T18:06:32Z")

</div>

thanks richard the code worked
