Announcement

Collapse
No announcement yet.

Set node question.

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

    Set node question.

    Hey there everyone, I have a question for you folks. I'm sure it's quite easy to figure out and all, but the answer is eluding me... How do I add this node (attached picture) to my blueprint? Like I said, I'm sure it's simple, but I do appreciate any help. Thanks ahead of time.
    Attached Files

    #2
    Well, first you'll need to have the variable that you want to set (Energy in the picture). Once you have created the variable, you can either right-click in the blueprint graph and search 'Set Energy', or you can drag the variable from the variables area onto the graph, and click set.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    Comment


      #3
      Set Nodes are added by either dragging the variable from the "My Blueprint" panel into the Graph Editor and selecting the Set option, or more pertaining to your case by your image that Set Node is attempting to Set a variable in another Object, hence the Target parameter.

      To Set a variable on another Object, drag off of the Object in question and use the context search to find the variable you want to Set and then choose the Set option for that variable. To note, the variable must not be Private for it to be editable outside of its local scope.

      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	340.8 KB
ID:	1088193

      You will notice that my Set Nodes i have create in that image are synced with the variables in the "My Blueprint" panel on the left.
      Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

      Comment


        #4
        It seems I should have elaborated a bit more on what I was looking for, I apologize for that. I've got a decent understanding of the basics in here so far, and I do have knowledge in programming (C++). What I'm trying to do is replicate what I have circled in the attached image. I understand how to add set nodes, but I'm unsure how to get the Set Node with the Target pin on it. Does that clarify it at all?

        PS - That image is not mine, just trying to come up with an energy regeneration system and this seemed simple.
        Attached Files

        Comment


          #5
          As i outlined above the Set Node with the Target parameter is used when your attempting to change the value of a variable on another Object.

          If you look at my image above you can see my "Owning Player" variable, which is a reference to the owning player character which has a variable on it called "bHoldingInteract".

          You need to drag off of your Object Reference and then search for the variable you wish to set in the context menu.

          Click image for larger version

Name:	capture.png
Views:	1
Size:	47.2 KB
ID:	1088203
          Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

          Comment


            #6
            So I re-attempted adding the Set Node using the method you described, after ensuring the variable was public, and it would not give me the node. It only brought up the standard set node. I have to be missing something, something simple... I do appreciate the help by the way


            Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	197.7 KB
ID:	1088216

            Comment


              #7
              As long as your reference is the variable type of the specific blueprint that contains the variable, it should let you access the variables.
              Marketplace Assets

              Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
              Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
              Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

              Comment


                #8
                If your HUDReference variable isnt of the correct type, you may need to cast it to your custom HUD Blueprint type like @Jamendxman3 said.

                Also just to clarify, your Energy variable you have there on the left in your "My Blueprint" panel is not the same as the variable Energy that you should have in your HUDReference Object.

                If you look at my screenshot again, you can see that my Blueprint "BP_Base_Placeable_Structure" does not contain a variable called "bHoldingInteract", im accessing that variable through the "OwningPlayer" Object which is where it resides.
                Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

                Comment


                  #9
                  I believe I understand what you guys are saying. I'm going to get back at it and see if I can fix it. I appreciate the help and will respond with what I figure out when I figure something out hehe. Thanks again!

                  Comment


                    #10
                    So I figured out what the problem was regarding my energy regeneration section. I still couldn't get the node I was originally looking for, but in the process found my error. Seems I forgot to connect the Timeline Node, now on to the next problem! Thanks again for your time and assistance.

                    Comment

                    Working...
                    X