Announcement

Collapse
No announcement yet.

Communication between player and widget

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

    Communication between player and widget

    I'm trying to print a simple "hello" with a interface, but my player cant send the message to the widget


    Player blueprint

    Click image for larger version

Name:	1.JPG
Views:	1
Size:	49.0 KB
ID:	1220247


    Widget blueprint

    Click image for larger version

Name:	2.JPG
Views:	1
Size:	36.0 KB
ID:	1220248

    #2
    In my experience, sometimes Print String does not output to the screen until your restart UE4.
    It's a bug, IMO.
    Check out my itch.io page, I'm really excited about it.
    https://kinos141.itch.io/

    Please check out my AI package: Action AI System Feat. Stealth
    https://www.unrealengine.com/marketp...m-feat-stealth
    or get it from itch
    https://kinos141.itch.io/action-ai-system-feat-stealth

    Comment


      #3
      I don't see the node "Add to viewport", in your player blueprint.

      Comment


        #4
        Originally posted by Big__Boss View Post
        I don't see the node "Add to viewport", in your player blueprint.
        Because this widget is the inventory slot. I'm searching to cast to this widget to set the item thumbnail when a item is pickup:

        This is ion the inventory widget
        Click image for larger version

Name:	1.JPG
Views:	1
Size:	54.3 KB
ID:	1128111
        Click image for larger version

Name:	2.JPG
Views:	1
Size:	57.0 KB
ID:	1128112

        Comment


          #5
          Originally posted by KinDaKreator View Post
          In my experience, sometimes Print String does not output to the screen until your restart UE4.
          It's a bug, IMO.
          Nope. I restarted a few times and it still without printing anything on the screen. Anyway, the print string node is only for testing. I'm searching for make a communication between the player and the widget.

          Comment


            #6
            Did you make a "REF" variable of the widget blueprint ? When you cast to this widget, make a "promote variable", and if I'm right, you need to make this REF variable "public".
            In this case, it's more simple to cast to this widget.

            Click image for larger version

Name:	LH2 1.jpg
Views:	1
Size:	33.5 KB
ID:	1128113

            Comment


              #7
              To me it appears like your setup is not correct or you're trying to do something Unreal can't.

              Here are my ideas (try one at a time):
              - Make sure the widget is actually spawned in the world by adding a print string to its construct event
              - What does the boolean "Top-level only" changes? Idk but maybe you should try your setup with it checked or unchecked and see if it changes anything
              - Try plugging something into the "Owner" input of the "Create widget" node, a simple "GetPlayerController(0)" will do the trick for testing purposes
              - Try adding the widget directly to the player screen instead of adding it as a child of a box (just to try out if it does print)
              - Try looping through the widgets you've found in your "GetAllWidgets" instead of taking the shortcut of plugging the array into the function (even if it's supposed to do the same thing)
              [Released] Multiplayer Combat Editor
              A-RPG Sacred Swords
              Auto-Chess Live Development
              Youtube Tutorials

              Comment

              Working...
              X