Announcement

Collapse
No announcement yet.

Local Variables in Macro

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

    Local Variables in Macro

    I can't see anyone asking it yet so....Why we can't use Local Variables in Macros? I think it's necessary for some implementations in Macro Blueprints.
    In a Class Blueprint we can use Functions but we can't make a "Function Library" and in "Macro Library" we can't use local variables... it's like a dead end.

    #2
    You can create 'anonymous' local variables inside a Macro. Have a look at something like the Do Once macro. You find them under Utilties->Macro.
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      That's exactly what i need. Thanks

      Comment


        #4
        I know this is old, But in case anyone else passes this up, You can also right click in a macro and type "Local <Integer, Float, Ect>" And it'll pull up a Local Variable!
        To set it, Type in "Assign" There is only one assign that'll set up for you once you plug in a Local Variable and compile it, And there it is! Beautiful Local Variables! Hope this helps someone in the future!

        Comment


          #5
          Originally posted by Entertainerx View Post
          I know this is old, But in case anyone else passes this up, You can also right click in a macro and type "Local <Integer, Float, Ect>" And it'll pull up a Local Variable!
          To set it, Type in "Assign" There is only one assign that'll set up for you once you plug in a Local Variable and compile it, And there it is! Beautiful Local Variables! Hope this helps someone in the future!
          Entertainerx, you deserve a medal
          Thanks so much for pointing this out !

          For those who would like to assign local variables in macro blueprint libraries, you should consider those nodes :

          Click image for larger version

Name:	variable_locale_Macro_Blueprint_Library.PNG
Views:	198
Size:	44.5 KB
ID:	1693778

          Comment

          Working...
          X