Changing Peripheral Vision Angle of AI during runtime on key press

Basically I’m trying to change the Peripheral Vision Angle of an Enemy BP based on whether or not the player has a flashlight turned on or off.

I tried to do it in the same manner I created the Flashlight input, but I’m assuming it’s not working because the code below is in the Enemy BP and it would only work if the Enemy is “pressing the input key” and not the First Person BP the player has direct control over?

I would then assume I’d need to use get and set reference to access a new Angle float from the Enemy BP but I’m not very good at coding so trying to map it out has been a little tough. Unless I’m completely overlooking something.

Any insight greatly appreciated.

Are you familiar with Interface Blueprints? It is a really good way to communicate with a bunch of different blueprints. See tutorial below. Basically, I would put the Flashlight input and the FlipFlop in the Player blueprint. From there, I would make an Interface Blueprint and implement it in your Enemy blueprints. From there, you can Get All Actors with Interface in the player bp and tell all enemies with the Interface to change their peripheral.

link text

I’ve implement what you’ve suggested so far, save for the last part. It seems as though there was a SetPeripheralVisionAngle function but it has been deprecated and won’t show up anymore. Research shows that I’ll need to do everything manually in C++, unless, hopefully, there’s another workaround that I’ve yet to find. I’d really prefer not to do it manually.