Announcement

Collapse
No announcement yet.

Blueprint coms set variable not working

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

    Blueprint coms set variable not working

    I have a variable in my CharBP named PlantLocation. I have created a variable in my blueprint trying to set it and referenced it. I can bring up the variable just find but when I try to set it with a transform value, I am getting this error. What am I doing wrong? The print strings are there for dubug and are printing the correct information at the top.

    Click image for larger version

Name:	Image2.jpg
Views:	1
Size:	21.5 KB
ID:	1160017
    Click image for larger version

Name:	Image1.jpg
Views:	1
Size:	147.5 KB
ID:	1160018
    Last edited by DocSkyHawk; 08-24-2015, 12:14 PM.

    #2
    The thing you are doing wrong is understanding what the Blue Variable is about.

    It is a reference variable. You need to fill it! It is empty by default. The Error "Accessed None" tells you
    that you are trying to access the empty variable. What is TransLocation? Which specific Actor are you trying
    to modify there?

    You may want to watch my video about pointer/references and this error:

    https://www.youtube.com/watch?v=PmcaFCMDnqQ
    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


      #3
      Originally posted by eXi View Post
      The thing you are doing wrong is understanding what the Blue Variable is about.

      It is a reference variable. You need to fill it! It is empty by default. The Error "Accessed None" tells you
      that you are trying to access the empty variable. What is TransLocation? Which specific Actor are you trying
      to modify there?

      You may want to watch my video about pointer/references and this error:

      https://www.youtube.com/watch?v=PmcaFCMDnqQ
      The variable in the CharBP has a transform value set in its BP just for a test but I want to update it often outside of the BP. I have another GET using this method and it is returning a 0 value. I have the CharBP print string and it is showing the correct value.

      I deleted the variables in the blueprints trying to use the CharBP one and just used cast to CharBP and that worked like a charm. I tried it before but with the variable reference in there it was giving an error so I stopped using it.
      Last edited by eXi; 08-24-2015, 02:25 PM. Reason: Doublepost

      Comment

      Working...
      X