Announcement

Collapse
No announcement yet.

Local variables in blueprint functions

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

    Local variables in blueprint functions

    Does anyone understand how the local variables in Blueprint functions work?

    I can create a local variable and it creates an item that will let me retrieve and use the value but I cannot seem to set the value of the variable. Am I missing something obvious?

    Thanks

    #2
    It looks like after you have your function variable in your blueprint, you can drag a line from it, and type "set" in the search field. You should see an option for "Set 'Your variable.'" You can then link it to a set variable node. You can edit this node in the details panel and connect it in the chain in your function.

    Hope that helps.
    |Mitchell Lucas
    |Technical Sound Designer at Magic Leap

    Comment


      #3
      As far as i know, the above does not work for local variables. And i can't find anything on it currently.

      Comment


        #4
        Okay, try this:

        Drag a line from the local variable and release the mouse button. There should be an option "Assign" under "Variables."

        Let me know if that helps!
        |Mitchell Lucas
        |Technical Sound Designer at Magic Leap

        Comment


          #5
          Originally posted by Peter Gordon View Post
          Does anyone understand how the local variables in Blueprint functions work?

          I can create a local variable and it creates an item that will let me retrieve and use the value but I cannot seem to set the value of the variable. Am I missing something obvious?

          Thanks
          Hello. Try it https://www.youtube.com/watch?v=2iNc...uO7N2Pmmw9pvhE

          Comment


            #6
            Obsidiaguy - thanks ... That worked.

            Comment


              #7
              I'll use this thread, cause my issue is related to the same topic...

              How "local" is a local function variable in UE4.4?

              1: myBP -> myFunc1 -> add Local Variable: myLocalVar: type int

              2: use myLocalVar within myFunc1.

              3: myBP -> myFunc2 -> add Local Variable: myLocalVar: type float

              4: trying to delete the last created local variable will display a warning: "Local Variable myLocalVar is in use! Do you really want to delete it?"

              Comment

              Working...
              X