Accessing boolean from First Person Character to use in Widget Blueprint

In my game, I have the current ammo and total ammo on the screen (above the green bar.)

I want the current ammo in the mag to blink red when LowAmmo? is true (when the ammo in the current clip is less than or equal to 10.) In FirstPersonCharacter, LowAmmo? is set to true when this happens. I try to access the variable in WidgetBlueprint and call a branch that plays the animation when LowAmmo? is true.

The animation does work, I tested it out before setting up the branch and I’m not sure why this wouldn’t work. I’ve asked for help from a number of people and they can’t seem to do it either, maybe the images will help…

Please forgive my cropping skills, the tool is kind of weird…

Your Event Construct will only called once. It does not care if your ammo is low at a later point in time. Logic Error on your side :stuck_out_tongue_winking_eye:

Yeah, at first I tried using Event Tick but it doesn’t let me. What should I use instead?

There are many ways to solve your Problem thats why I did not get into any specifics. Also plese learn to describe your Problems more accourate “it doesn’t let me” is not very Informative.

Create a Event Dispatcher call it “OnAmmoChanged” in your Character. Call that Dispatcher right after you Set Current Ammo. You can get rid off the low ammo bool and comparisons in your Character.

In your Widget you get your Character (drag wire) and Type Assign OnAmmoChanged. Now your Widget will Listen to the Dispatcher Event. From there on you can do whatever you like.

Also Watch that Video it makes your understanding of BP Communication easier.