Gameplay Tag container Reference

hello there im very new to unreal BP scripting and im trying to figure this problem out, from my understanding you need to add the gameplay tag inside a container variable inside of a blueprint, these tags can be accessed from anywhere but the tag container cannot without referencing the BP,

my first question is

How do i Reference tag container (blueprint 1 has container that has tag dashing, and in another bp i Reference that container to check if it has it then do action 1 or 2)

Question 2

i made a system to switch elements on button press 1 gives tag earth and removes other elements, and button 2 gives tag fire and removes other tags, but now i wanna reference that container in the animation blueprint to have different idle animations for each tag in that container, but when i reference it, it returns error “accessed none trying to read property” the animations work tho, but the error presists

your help and guidance would be extreemly valuable, thank you in advance!

use an actor component or interface

GameplayTagContainers wont give this error so its likely something else, we’d need to see some code

1 Like

here i just made it so i can switch between elements using numbers 1-4

then here i called it in the Animation blueprint so i can use it to set the animation states for each “element”

but it is on a component that is attached to the Character Bp

it works and the animations change like i want but i get this error message

(also thank you for replying to my question!)

First off your Anim BP Event graph should start like the following.

BP Initialize is where you create a reference to your Character Class and its movement component.

On the Update Animation, after validating the character reference is set, you’d use the Character Ref to get the Actor Component then its current tag… set as needed.

1 Like

the error just means on the first AnimUpdate Tick the component wasnt valid/initialized but after that it was hence it worked.

Revs solution above is correct

1 Like

Thank you for the reply!

also i did as you suggested

but i still got the same error

2

because you have two different references. Elf and Combat. So now Combat isn’t valid.

again this is only on the first frame so it kinda isn’t a problem, still its good practice to handle the initialization of your objects properly.

1 Like