# Cast To Object Wildcard Error

**URL:** <https://forums.unrealengine.com/t/cast-to-object-wildcard-error/438922>\
**Category:** Blueprint\
**Tags:** error, casting, set, unreal-engine, UE4, Blueprint, question\
**Created:** [December 5, 2018, 3:52pm UTC](https://forums.unrealengine.com/t/cast-to-object-wildcard-error/438922 "2018-12-05T15:52:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_48e01ba6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48e01ba6](https://forums.unrealengine.com/u/anonymous_user_48e01ba6)\
**Post date:** [December 5, 2018, 3:52pm UTC](https://forums.unrealengine.com/t/cast-to-object-wildcard-error/438922/1 "2018-12-05T15:52:46Z")

</div>

I’m trying to set a boolean variable to trigger my spawner to… spawn. But I get an error when I try to cast to the spawner blueprint. I’m new to unreal and I don’t know what to put in the object pin to get this to work. Any help is great, Thanks.

 ![261406-wildcarderror.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/5/e95d794a72f0922c409385018de1a15e8d2276eb.png)

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [December 5, 2018, 11:03pm UTC](https://forums.unrealengine.com/t/cast-to-object-wildcard-error/438922/2 "2018-12-05T23:03:15Z")

</div>

you need to plug a reference to the actor your trying to affect into the object. so in your case you need an instance of the bp\_itemspawner. theres many ways to get a reference including traces, overlaps, public variables, and blueprint communication.

also your cast will never actually get fired anyway since you are destroying the actor containing this script prior to the cast node.
