Please help Pleeeeeaase

I have a widget with a slider bar on it.
I want the slider value to be passed to my level blueprint or player controller when it changes.
Then I want my actors to be watching this variable in the Level BP and react accordingly. Ideally, they will turn on and off depending on the Variables value.

I have been spinning my wheels on this project for months. I’ve tried multiple methods for accomplishing what I want and I’ve posted here at least 7 times and NOONE replies. Yet I know this can be done.

I’m BEGGING now. Someone pleeeeeaaaaase help me out.

There are a couple of ways to do this. You can do direct blueprint communication using casts to transfer the public variable around, or use an interface to pass the variable between blueprints. There is also some other ways, but those are only ways I am familiar with. If my information is faulty, someone please correct.

For the first method, using direct blueprint communication. You can cast from the widget to where you house the public variable you want changed( game mode would work well). So now any time you change your widget slider it directly changes the variable on the game mode. Then create listening events/functions on your level blueprint that links all your actors to update whenever the variable on the game mode changes.

For the second method, using blueprint interfaces. You can create an interface and setup a basic function that moves the data from one BP to another. Simply add the variable to input/output sections. Attach the interface blueprint to your widget, and your level blueprint. Setup at the end of your widget slider function to send the data to your other BP and setup a function that listens for a change in variable and updates.

Documentation on both methods:

https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/BlueprintComms/index.html

https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Types/Interface/index.html

Update if you are still having trouble, good luck.

are you casting your slider value to the Level BP ?

Hi!
You should use a GameInstance. You define the varable inside gameinstance blueprint. Then you can use the variable everywhere. Just make sure you choose the saved GameInstance in your project settings.

Alphawolf, yes. and successfully. I’m stuck trying to get the actors to see the value

I will look into this. Thanks!

Thank you for this.  I will give it shot shortly here.  Thanks for the reply!

I would probably use an interface, like in this example in the attachment that I made real quick

I’m not sure the interface is the way to go. I have over 40,000 actors that need to watch the variable and react. :confused:

If you are using a master actor BP and the 40k actors are child variations. You can set it up that it listens for the change instead of level blueprint and it will update them all in the level. Also using gameinstance instead of game mode is probably better to house the variable.

I imported my model from Revit with Datasmith. How do I set it up to listen for a change? Also, it looks like if i add any blueprints to the datasmith actors, it removes the datasmith information that was attached. I need that info to stay intact.

maybe i have to revisit the basics. I cant even assign a blueprint to multiple actors.
I’ve never used game instance, so i’ll be toying around with that too.

thanks for the input so far!

Read up on this documentation and it should answer most of your questions about blueprints. I’ve never worked with Datasmith, can’t help you there. Maybe someone else can. Never hurts to read up on that documentation too!

Hey - are you still having trouble with this?

Hi, I was . Yes. I am.