# Actor AnimBP cannot reference Pawn Variables?

**URL:** <https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204>\
**Category:** Character & Animation\
**Tags:** possess, cast-to, child-actors, actor-blueprint, possession, unreal-engine, question\
**Created:** [May 11, 2021, 6:17am UTC](https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204 "2021-05-11T06:17:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RipSteez\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RipSteez\_1](https://forums.unrealengine.com/u/RipSteez_1)\
**Post date:** [May 11, 2021, 6:17am UTC](https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204/1 "2021-05-11T06:17:14Z")

</div>

Hello, new to Unreal Engine.

I am making a tower defense game, and the foundation is a template I found online.

The wave enemies are Pawns and I was able to configure animation blueprints that keep them walking and then a death animation when hp \<= 0.

My issues is I am now trying to make the attack towers, and the tower parent from the template is configured as an actor. From what I am finding online actors cannot reference variables that exist in pawns?

In my animation blueprint for the towers (I am using paragon characters as towers) I want them “Idle” when no enemy is in range and looping “Attack1” when enemy is in range. I have tried many things I found online but to no avail.

What is the best course of action for my desired outcome?

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [May 11, 2021, 2:11pm UTC](https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204/2 "2021-05-11T14:11:48Z")

</div>

Hi,

> From what I am finding online actors  
> cannot reference variables that exist  
> in pawns?

if it does not inherit from pawn, then it can’t access any functionality of pawn. You can just reparent your tower parent to pawn though if you need that.

> In my animation blueprint for the  
> towers (I am using paragon characters  
> as towers) I want them “Idle” when no  
> enemy is in range and looping  
> “Attack1” when enemy is in range. I  
> have tried many things I found online  
> but to no avail.

State machine with two states, call them something like “Idle” and “Attack1”, switch between them based on enemy is in range boolean. Where exactly is your problem there (image of code of what you already have and what your problem there is could be helpful) ?
