# Casting to child blueprint

**URL:** <https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450>\
**Category:** Blueprint\
**Tags:** accessed-none, unreal-engine, cast, Blueprint, question\
**Created:** [April 22, 2024, 12:35pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450 "2024-04-22T12:35:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samhall1995](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samhall1995](https://forums.unrealengine.com/u/samhall1995)\
**Post date:** [April 22, 2024, 12:35pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450/1 "2024-04-22T12:35:52Z")

</div>

Hi everyone

I’ve been trying for a couple weeks to get the information of a weapon but no matter what i try it always comes back with a “Accessed none” error and its driving me mad. It seems like this should work but I’m not understanding why it never seems to get the information from it and either fails to cast or accesses none

 ![accessed none](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/b/53bba928010753964d34d74a539bff35066fe110.jpeg)  
 ![BP cast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/f/52fe894e4529f9e23418f76c2909fc0940310c8c.jpeg)  
 ![BP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/7/1f788ef25de0dcbf8540ea0e347b7b792f6e6e3d.jpeg)

---

<div class="post-metadata">

**Author:** ![Extrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extrone/32/906554_2.png) [@Extrone](https://forums.unrealengine.com/u/Extrone)\
**Post date:** [April 22, 2024, 12:55pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450/2 "2024-04-22T12:55:40Z")

</div>

Where are you setting the value for the Weapon Master and BP Rocket Launcher variables?

Accessed None errors mean that the variable is empty or NULL. You need to set it to a reference of the actual object/actor from the level.

If you’re trying to access the default values of variables from a class, you need to create a Class Reference Variable instead of an Object Reference.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/1/d61deff14a488a284730e90c93e05906e22f3032.png)

Set the value of the variable to the child class you want  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/c/a5c4fcf10f1e57a3c09811736c69f9a289e8d375.png)

Use the Get Class Defaults node to get the default values.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/e/77ef2ccb9c61e0f91d5ce43dd4ddbb131a975eea.png)

---

<div class="post-metadata">

**Author:** ![samhall1995](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samhall1995](https://forums.unrealengine.com/u/samhall1995)\
**Post date:** [April 22, 2024, 1:38pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450/3 "2024-04-22T13:38:04Z")

</div>

Thank you so much for that. I’m fairly new to this but hadn’t got that stuck before. You’re a legend. Now to just figure out how to randomly set the value of the variable which will hopefully wont take as long. Thanks again though, massive help

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 22, 2024, 1:38pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450/4 "2024-05-22T13:38:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
