# need help with accessing variables

**URL:** <https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [August 25, 2025, 10:57pm UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907 "2025-08-25T22:57:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 25, 2025, 10:57pm UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/1 "2025-08-25T22:57:33Z")

</div>

i have a ‘footstep volume’ float variable in my bp\_thirdpersoncharacter and i have a bp\_footstepanimnotify that adds notifiers to my animations for playing the footstep noise. how can i access the footstep volume variable from bp\_thirdpersoncharacter and change it in bp\_footstepanimnotify ?

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 2:11am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/2 "2025-08-26T02:11:29Z")

</div>

In your Animation BP Event Graph you can reference your character class and get the variable.

Best served if you create a float var in your Anim BP and use the characters to set it.

**Note** The `Event Blueprint Update Animation` executes once a frame.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/0/c70a015c03e062d344268ca53a44a79098345f4e.png)

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 3:39am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/3 "2025-08-26T03:39:06Z")

</div>

i tried something similar to that but any time i add a reference to the character i get an error saying its read only

heres a screenshot

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/0/d00eca3a915efa779016a2f5efec2993122a09c4.png)

---

<div class="post-metadata">

**Author:** ![LegendGary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LegendGary](https://forums.unrealengine.com/u/LegendGary)\
**Post date:** [August 26, 2025, 3:49am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/4 "2025-08-26T03:49:10Z")

</div>

Get Owner \> Cast to Player?

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 4:12am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/5 "2025-08-26T04:12:40Z")

</div>

unfortunately it doesnt seem to work. the variable in the bp\_footstepanimnotifier doesnt let me change it to a ‘set’ variable and it says it is read only

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 4:15am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/6 "2025-08-26T04:15:02Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/b/52b31cae7017a755ba2f62b3691fd302bef2576c.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/b/84beadee47c0625c81eb6c5655482dda82a36562.jpeg)

this is what i have so far. im trying to grab the variable from the character bp and set it with the value of the variable in the animnotify bp

---

<div class="post-metadata">

**Author:** ![LegendGary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LegendGary](https://forums.unrealengine.com/u/LegendGary)\
**Post date:** [August 26, 2025, 4:43am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/7 "2025-08-26T04:43:08Z")

</div>

you cast then just get the footstep volume of the character. dont need to set. or do you want a different volume for different surface?

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 4:50am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/8 "2025-08-26T04:50:48Z")

</div>

yeah so basically ive got the footstep volumes set up and i want to change the volumes of them based on the player state (like walking, sprinting, crouching etc) but those states are initialised in the character bp. so i set the footstep volume in the character bp when the player is in those states and i just want to translate that value to the anim notify bp that holds the logic for initialising the footstep sounds.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 4:53am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/9 "2025-08-26T04:53:30Z")

</div>

I see what you’re doing now. You’re using the Anim Notify Class which has no direct ownership to the character. It’s an independent data asset with functionality. The Animation Sequence executes the Notify Class and passes the mesh component obj ref. You can use that to get a reference to the character.

Overall This is BAD! Your casting to the character class _N_ times a second.

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

You’re better suited to handle footstep sounds directly in the character class or in the animation class.

This example handles them directly in the Animation class.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/3/e339af0953b0e1671d9e1e0b557e907b548aa0ea.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/0/0809286dac133f7ec8bf7ad7edcd9592d49b0d5a.png)

Parsing the surface type runs through a primary data asset. Whish returns the Meta Sound Preset.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/0/d000b813cfbf426e1c5472bc8c701d30cae52d20.png)

Presets are MS Data assets.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/1/af1531b9b7c55b3f34da5e17f1c18041f1b742b3.png)

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/1/6c13d3ddf67688fbdccd3511987186b7e855ba0f.png)

Presets execute the Meta Sound source

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/2/0f27167b2456599046ae3159f27faebb5b29e1bc.png)

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 5:06am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/10 "2025-08-26T05:06:12Z")

</div>

oh wow thats a lot of information. i understand it better now. ill try to use these methods to the best of my ability. thank you for explaining.

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 5:45am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/11 "2025-08-26T05:45:15Z")

</div>

oh my lord i accidentally found another solution to my problem while adding a new feature. basically im making a dbd style game and wanted to add a sound when fast vaulting. i clicked on the footstep anim notifiers on the animation and found that you can individually change the sounds of each notifier. lmao i feel kinda silly now, but still, thank you for all your help.

edit: ( this was possible since i made the footstep volume variable in the footstep anim notifier and linked it to the volume multiplier nodes on all of my footstep sound effects, so i could now just edit the variable in each animation that uses the notifier.  
therefore, i can set the default value as my walking speed for example, and then just manually change the crouch notify volume and running notify volume. )

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/d/0edab487d7ef56944b6a5a5d80116ca73e40276e.jpeg)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 5:53am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/12 "2025-08-26T05:53:37Z")

</div>

If you’re having to cast to your character or any other heavy class it’s going to hit performance. Notifier class is fine for things that aren’t overly dynamic. If I used them for Footsteps I’d probably tank 20+ FPS right out of the gate. They are perfect for things like racking a shotgun, mag reloading, button toggling.

---

<div class="post-metadata">

**Author:** ![Jambo857](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambo857/32/1000349_2.png) [@Jambo857](https://forums.unrealengine.com/u/Jambo857)\
**Post date:** [August 26, 2025, 5:57am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/13 "2025-08-26T05:57:00Z")

</div>

i see, ill keep that in mind if my performance starts getting worse as my project goes on. but as for now it seems to be performing well and working as intended. thank you again for the help and knowledge.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 6:09am UTC](https://forums.unrealengine.com/t/need-help-with-accessing-variables/2650907/14 "2025-08-26T06:09:10Z")

</div>

It’s mainly a matter if you’re doing multiplayer or have a lot of AI. How much casting your doing with other classes. If dead set on using them I’d setup interface functions to pull the data needed.

Create a interface function in the character interface class called `Get Volume`. Have it return a float. Dbl click it in the character class and pass the float to the return.

Then in the notifier received function `mesh comp → Get Owner → Get Volume`

No casting. If there’s other data you’ll need then create a struct and have the function return that.
