# How to know if SpawnActorFromClass have failed

**URL:** <https://forums.unrealengine.com/t/how-to-know-if-spawnactorfromclass-have-failed/554792>\
**Category:** AI\
**Tags:** unreal-engine, UE4, UE4-27, Blueprint, question\
**Created:** [May 11, 2022, 4:46pm UTC](https://forums.unrealengine.com/t/how-to-know-if-spawnactorfromclass-have-failed/554792 "2022-05-11T16:46:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLizardWizard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheLizardWizard](https://forums.unrealengine.com/u/TheLizardWizard)\
**Post date:** [May 11, 2022, 4:46pm UTC](https://forums.unrealengine.com/t/how-to-know-if-spawnactorfromclass-have-failed/554792/1 "2022-05-11T16:46:05Z")

</div>

Hello everyone !

I am trying to make an AI spawn a little actor that will seek positions for him (to teleport), but the issue here is that sometime the spawn is impossible, and if that the case I want to try other positions. But how can I know if the spawn fail ?  
I already try to compare the return value of the node with a null actor but that don’t seem to work.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/7/a37aa6a67b35bbb82439fdc1129d2b74f44b2af9.png)

---

<div class="post-metadata">

**Author:** ![Zmtrk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zmtrk](https://forums.unrealengine.com/u/Zmtrk)\
**Post date:** [May 11, 2022, 4:50pm UTC](https://forums.unrealengine.com/t/how-to-know-if-spawnactorfromclass-have-failed/554792/2 "2022-05-11T16:50:23Z")

</div>

I believe you could try this  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/8/d98472373ce005c6a742e8bccbd95ce67813a9be.png)

---

<div class="post-metadata">

**Author:** ![TheLizardWizard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheLizardWizard](https://forums.unrealengine.com/u/TheLizardWizard)\
**Post date:** [May 12, 2022, 8:24am UTC](https://forums.unrealengine.com/t/how-to-know-if-spawnactorfromclass-have-failed/554792/3 "2022-05-12T08:24:15Z")

</div>

Oh, I feel a little stupid ahah  
But it is working perfectly, thank you
