Announcement

Collapse
No announcement yet.

UMG Inventory Tutorial Help.

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

    UMG Inventory Tutorial Help.

    Hello, I followed all of the vidoes on the UMG Tutorial by Epic. And there are a few things that i cannot seem to fix. First the "ActionText" Variable should update the Textbox on your use button based on the item you clicked but its does not do that.Second When i Use/Drop the item picture becomes transparent and the inventory just freezes but the rest of the game runs fine.I really want to get this to work has anyone had these issues and know how to fix them?. Ill post the blueprints for the parts that arn't working if you need to see other let me know.I'll also upload a video and attach it aswell.(i know how to fix walking while the inventory is open i just did that to show its not the game that freezes.)

    Drop Items in "MyCharacter" Blueprint
    Click image for larger version

Name:	Drop_Items.png
Views:	1
Size:	80.9 KB
ID:	1144254

    Drop Items in "Umg Widget"
    Click image for larger version

Name:	Drop_Items2.png
Views:	1
Size:	138.2 KB
ID:	1144255

    Use Items in "Umg Widget"
    Click image for larger version

Name:	Use_items.png
Views:	1
Size:	133.6 KB
ID:	1144256

    Use Items in "Pickup" Blueprint
    Click image for larger version

Name:	Use_items2.png
Views:	1
Size:	78.8 KB
ID:	1144257

    And there is where the text should be changed on the button.
    Click image for larger version

Name:	Text.png
Views:	1
Size:	104.2 KB
ID:	1144258


    #2
    have you tested the free system i provide?
    Free Inventory System (BP AND C++ Version): Clicky Clicky
    Player Structure System (Houses!) (BP): Pew Pew Marketplace Version: Yoink!
    Howto: Create Dragable UMG Windows: Zoom Zoom

    Comment


      #3
      No all i did was follow the tutorial by Epic.

      Comment


        #4
        may i see your set up for the binding of your action text variable? So the buttons child widget text block.

        When you add a breakpoint to set visibility, hit play and then hit a slot, it should now fire the breakpoint, hover over the Action Text variable and tell if its empty or not
        Live long and prosper.

        Comment


          #5
          Is this what you mean?
          Click image for larger version

Name:	action.png
Views:	1
Size:	21.0 KB
ID:	1066437

          Comment


            #6
            yes that was one thing. I assume the function Inventory Slot Clicked is inside this Widget blueprint?

            Have you tested with a BreakPoint yet?


            regards

            EDIT:

            Oh noo i see, when you set the Action Text you are not inside the Widgets Blueprint, you just set a Text to the action text but not for the boundvariable inside your widget.

            2 Options:
            - Make the variable Action Text Public inside your Widget Blueprint -> then inside your Inventory Slot Clicked (Picture) grab the ouput from Action Menu and type "Set Action Text" you now have the bound variable
            connect your "Actions" output from your struct to this "Setter" and voilá.

            - instead of making it Public, you could add a public Function called f.e. "Set Action Text" -> do the same as above, but instead getting the Variable you would call the Function.

            regards
            Last edited by Wallhalla; 02-14-2015, 06:50 AM.
            Live long and prosper.

            Comment


              #7
              Originally posted by Wallhalla View Post
              yes that was one thing. I assume the function Inventory Slot Clicked is inside this Widget blueprint?

              Have you tested with a BreakPoint yet?


              regards
              I'm not sure what you ment why you were talking about the breakpoint. And I have a Inventory Slot Int not a function. The only two function that were in the tutorial from Epic were Drop/Use.

              Comment


                #8
                Originally posted by Firezown View Post
                I'm not sure what you ment why you were talking about the breakpoint. And I have a Inventory Slot Int not a function. The only two function that were in the tutorial from Epic were Drop/Use.
                I meant your Picture called Inventory Slot Clicked .

                Breakpoints are really useful but not needed anymore in your case, see edit post above.
                Rightclick on a Node you have and click "Add Breakpoint" when this node is fired during gameplay it will stop at this point and f.e. you can check the variables around if they are valid or what current value they have.
                Live long and prosper.

                Comment


                  #9
                  Doing what you said gives me the exact same variable i have set up there.

                  Click image for larger version

Name:	f7cdcf14cfcbd1fb0cc7fece2b1535a5.png
Views:	1
Size:	100.7 KB
ID:	1066438

                  And my Action text was already set to Public.

                  Comment


                    #10
                    No these are not the same variables. The one we see here is the Action Text of a Blueprint i dont know of (edit: it is MyCharacter->ActionText), but NOT the Action Text Variable of Action Menu.

                    So you have to set the ActionMenu->ActionText variable

                    edit edit: you can even delete the Action Text Variable out of your Character Blueprint


                    edit edit edit: oh its the PickUp Blueprint which has the ActionText
                    Last edited by Wallhalla; 02-14-2015, 07:25 AM.
                    Live long and prosper.

                    Comment


                      #11
                      Lol i'm sorry i'm getting really confused now.So the variable that i have set and connected to "Set Visibility" is not the one i should have there?. I need to drag off of Action Menu and Set "Action Text"?. But when i do that its the same thing that i have set already. I don't really understand what you are trying to say sorry.

                      Comment


                        #12
                        Ok stop right here

                        This logic with the Action Text should be located inside of the "GameHUD UMG Widget Event Graph". When you click a Button (Inventory Slot) you
                        call the Binding to the Function/Event "ButtonWasClickedEvent". The Button Number represents the Slot in your Inventory, so you take it to get
                        your Inventory Slot you clicked. From that you get the Struct and the Action Text that is saved to this specific Item.

                        This will go into the "Action Text" variable which is located in the UMG Widget and should be binded to the Text of the Button you showed us.
                        If this is all set up correctly, then the error is somewhere else.

                        NOW: In your video, you show that the Action Text GETS changed, but to "" <- nothing. So i guess you have a bug in the Item you picked up.

                        So please check:

                        - Does your item has a valid ActionText Set when you spawned it? (maybe check the Objects options or print the action text)

                        If it's not empty, then there must be an error when you are picking it up. Are you sure you made everything correct what happened in video 6?
                        Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                        My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                        (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                        Comment


                          #13
                          So the variable that i have set and connected to "Set Visibility" is not the one i should have there?. I need to drag off of Action Menu and Set "Action Text"
                          Yes that is exactly what i want.

                          The Problem is:

                          You have a Variable called Action Text inside your PickUp Blueprint.
                          And you have a Variable called Action Text inside you ActionMenuWidgetBlueprint.
                          The one which is bound to you Button´s Text is the one from ActionMenuWidgetBlueprint.
                          The one from you PickUp does, tbh, nothing

                          so you have 2 different variables with the same name. They are different because one is part of your PickUp and one is Part of your ActionMenu.

                          When you drag off Action Menu you will be able to get and set everything INSIDE the ActionMenu and so is the bound Action Text Variable.

                          edit: if
                          You have a Variable called Action Text inside your PickUp Blueprint.
                          thas is wrong then go try out with a breakpoint
                          Last edited by Wallhalla; 02-14-2015, 07:55 AM.
                          Live long and prosper.

                          Comment


                            #14
                            Originally posted by Wallhalla View Post
                            The Problem is:

                            You have a Variable called Action Text inside your PickUp Blueprint.
                            And you have a Variable called Action Text inside you ActionMenuWidgetBlueprint.
                            The one which is bound to you Button´s Text is the one from ActionMenuWidgetBlueprint.
                            The one from you PickUp does, tbh, nothing

                            so you have 2 different variables with the same name. They are different because one is part of your PickUp and one is Part of your ActionMenu.
                            How do you know that? The Action Text of the Item is inside its struct. The ActionText you see at the picture he showed us with the "ButtonClickedEvent"
                            is located inside the UMG Widget,... as long as he followed the Tutorial + i don't think you can call a "ButtonClicked" Function in the Pickup Actor
                            without having any ButtonActor to link to

                            You normaly set the Action Text of the Item Struct for each item inside its Blueprint or when it's spawned in the option at the right side of the editor.
                            And the Logic we see at his last picture is the part where this variable gets linked to the Action Text of the Widget, which is the Binded Variable for the
                            Button.

                            So normaly this should work. He must have forgotten something in the Item or within the pickup method.

                            @Firezown: Would you mind showing me the Struct of your Item that you tried to pickup and of the Blueprints where you assign this variable
                            and put it into the Iventory?
                            Last edited by eXi; 02-14-2015, 07:56 AM.
                            Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                            My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                            (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                            Comment


                              #15
                              hey,

                              what i see at the picture is not a click event but a delegate call thats why i assume he is not inside a widget

                              he could even be in the controller class as well... i dont know until he tells me^^

                              Edit: but i dont know the tutorial he followed

                              edit: @exi: ah ok now i see what you are up to
                              Last edited by Wallhalla; 02-14-2015, 08:08 AM.
                              Live long and prosper.

                              Comment

                              Working...
                              X