# Replace actor with another one with the same position

**URL:** <https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831>\
**Category:** Community & Industry Discussion\
**Tags:** position, Destroy-Actor, unreal-engine, question\
**Created:** [September 15, 2021, 5:17pm UTC](https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831 "2021-09-15T17:17:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pokenic99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pokenic99](https://forums.unrealengine.com/u/Pokenic99)\
**Post date:** [September 15, 2021, 5:17pm UTC](https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831/1 "2021-09-15T17:17:09Z")

</div>

Hi everyone,

I’m making a game like “wall bricker” but with two players.

i want that, the ball once it fell down, one random normal block become an indestructible golden block.

**Here what I did: Get all the actor of class (normal-block) \> get (a random block) \> Get the location of the chosen block for spawn a golden block \> destroy the normal actor**

The real problem is… The golden block spawn in the position of a random normal block, but the destroyed block is an another

here the example: (sorry if it is so dark)

 ![348723-wrong-block.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/5/555bebdc5ed85614943ec7e6a4dc6d0a086af921.jpeg)

And here the Blueprint:

 ![348724-bp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/e/0dea337be88455d305e99fd202bce8f9476ebc54.jpeg)

---

<div class="post-metadata">

**Author:** ![Pokenic99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pokenic99](https://forums.unrealengine.com/u/Pokenic99)\
**Post date:** [September 15, 2021, 5:20pm UTC](https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831/2 "2021-09-15T17:20:26Z")

</div>

I forgot to say… I just test the coordinates where the golden block will spawn and the coordinate of the chosen block to destroy… and they are not the same coordinates

---

<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:** [September 15, 2021, 5:39pm UTC](https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831/3 "2021-09-15T17:39:04Z")

</div>

It’s because of how randomisation evaluation works. Try it like this:

 ![348718-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/9/b39eb1f533533a5434a326055fc8b8d720a327e9.png)

In short, if you evaluate `random` twice, you’ll get 2 random results - and they may not be the same. If you think this will print the same random number:

 ![348719-screenshot-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/4/85497a5ed0cdf8964376146ffb851a5c0e1360f9.png)

Think again, it rarely will.

---

<div class="post-metadata">

**Author:** ![Pokenic99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pokenic99](https://forums.unrealengine.com/u/Pokenic99)\
**Post date:** [September 15, 2021, 7:19pm UTC](https://forums.unrealengine.com/t/replace-actor-with-another-one-with-the-same-position/488831/4 "2021-09-15T19:19:45Z")

</div>

Hey, thank you so much! It’s working! 😃  
I now understand the random logic too.
