# Randomly spawn wall with probability of 50%

**URL:** <https://forums.unrealengine.com/t/randomly-spawn-wall-with-probability-of-50/436857>\
**Category:** Blueprint\
**Tags:** spawn, random, random-numbers, wall, unreal-engine, question\
**Created:** [November 1, 2018, 7:51pm UTC](https://forums.unrealengine.com/t/randomly-spawn-wall-with-probability-of-50/436857 "2018-11-01T19:51:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![largoodie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@largoodie](https://forums.unrealengine.com/u/largoodie)\
**Post date:** [November 1, 2018, 7:51pm UTC](https://forums.unrealengine.com/t/randomly-spawn-wall-with-probability-of-50/436857/1 "2018-11-01T19:51:51Z")

</div>

Disclaimer: I have very limited programming experience.

I am trying to randomly spawn a wall each time the map is loaded. The simplest way to do this would be to pick two numbers. If one number is selected, the wall is chosen, and if the other number is selected, the wall is not created. I tried looking through the blueprints for a basic if then statement or something like that, but had no luck. This seems like it should be very simple. If you have anything to say about this, please let me know as I am very lost. Thanks!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 1, 2018, 9:14pm UTC](https://forums.unrealengine.com/t/randomly-spawn-wall-with-probability-of-50/436857/2 "2018-11-01T21:14:39Z")

</div>

> This seems like it should be very  
> simple.

And it is:

 ![258289-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/2/322b85516754892e1ec0f1be9de05c9b2fe1f877.png)

And there’s half a dozen ways of doing it. Or like this:

 ![258290-cap2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/5/c85b37b88b1f7a7a0272378fd2b5e9a66e1d87bf.png)

---

<div class="post-metadata">

**Author:** ![largoodie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@largoodie](https://forums.unrealengine.com/u/largoodie)\
**Post date:** [November 2, 2018, 1:55am UTC](https://forums.unrealengine.com/t/randomly-spawn-wall-with-probability-of-50/436857/3 "2018-11-02T01:55:47Z")

</div>

Thank you so much! This is so much help!
