Announcement

Collapse
No announcement yet.

Variable from Class to Level Blueprints

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

    Variable from Class to Level Blueprints

    Howdy,
    In my Level blueprint script, I'm trying to read a variable from an instance of a class. I have an Event Dispatcher which I can use in my Level script, but it only triggers when the event takes place. It doesn't pass variables. How can I do this?

    If that does make sense, this might be more specific:

    I have a blueprint class that includes a light and some other actors. It also has a variable that is public. When I place instances of this blueprint in my level, I set the public variable.

    All kinds of things happen within the class when a collision takes place, but I would like the level blueprint to read the variable from the instance which was in the collision and do more things with that data.

    Thanks,

    Sterling
    Run with the flock, end up a lamb chop!

    Unreal 4 in 30 Days - An Unreal Experience: https://youtu.be/DV5l7d4b9Cs

    #2
    You need to get a reference to the blueprint instance. Click on the instance of the blueprint that is placed in the level. Go to the level blueprint. Right click on an empty area in your level blueprint event graph. The third option should be "Create a reference to (insert blueprint instance name)". Now you should be able to get the variable from your blueprint instance reference.
    Logitech Wheel Plugin

    Comment


      #3
      Thanks. This helped me solve my problem.
      Run with the flock, end up a lamb chop!

      Unreal 4 in 30 Days - An Unreal Experience: https://youtu.be/DV5l7d4b9Cs

      Comment

      Working...
      X