How to control multiple BP Actors simultaneously with one widget?

How to control multiple BP Actors simultaneously with one widget? For example, I have an Actor Blueprint with a cube that rotates when I click the button. Now I duplicate the blueprint but only one works and rotates how can I control both at the same time with the widget? Is there any way to keep the logic in my blueprint actor, but just say please make the player controller work for BP1 and Bp2 and so on at the same time?

Dispatch the button click to the actors. Buttons have the onClick event actors’ Custom Events / Functions can hook up to. You can also add custom dispatchers.


If you need a more detailed suggestion, consider adding more details yourself:

  • how do the actors make it into the game?
  • how do you choose which actors are affected?
  • how does the widget make it into the game?
  • optionally, but ideally, what are we really making?

Thank you! Yes, that’s clear. The actor with its logic is placed in the level and then copied several times in the Editor. When the game is started, they should all be controlled immediately. I would like to integrate my widget into the HUD Blueprint and then simply control all Actors at once. My only question is what logic do I have to implement so that I can control several Actors at once that have the same widget logic, at the moment only the last one copied works? I think I have to tell the player controller somehow it should control also all copied actors.

1 Like
  • create a custom event in the cube actor, script what Rotate means for this actor here:

image

  • create the widget and bind the button click to the actors that need it:

The above translates to: whenever a button is clicked inside the widget, execute the Rotate custom event in all actors of that class. You can have this script anywhere but not inside the aCube actor.