Announcement

Collapse
No announcement yet.

How can i communicate Widget blueprint with actor blueprint?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can i communicate Widget blueprint with actor blueprint?

    I just wanted so clicking a button inside Main_UI (Widget Blueprint) would start an event inside SpawnPoint (actor blueprint). I tried calling an interface message, i tried event dispatchers, and custom events, but i didn't get even to print string off that custom events.

    The only mistake might be there that i dont even understand how to solve is this blue target pin, because it stores nothing and if i print string it - it returns nothing. How can i solve this and call this event and make it work?
    Click image for larger version

Name:	Новый точечный рисунок (2).jpg
Views:	1
Size:	59.5 KB
ID:	1225832

    Click image for larger version

Name:	Новый точечный рисунок (23).jpg
Views:	1
Size:	23.7 KB
ID:	1225831

    I've looked lots of tutorials for blueprints, interfaces, message calls, event dispatchers, blueprint communication, custom events, but there were no things like this

    #2
    Communications between blueprints can be very tricky. A way to do it (maybe not the most efficient one) is to use the player blueprint as a "tunnel". Simply cast from the widget to the player and then cast from the player to the actor blueprint.

    Comment


      #3
      What you can do is setting Spawn Point reference when the Spawn Point actor is spawned to level. So from Spawn Point actor BeginPlay, GetPlayerController, cast to it, get main widget ref (if you dont it's good idea to do so), get button widget (has to be set as variable) and set SP ref. Then you can just drag from the SP ref and call what ever function the Spawn Point has

      Comment

      Working...
      X