Announcement

Collapse
No announcement yet.

Setting a variable in one blueprint equal to a variable in another at game start

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

    Setting a variable in one blueprint equal to a variable in another at game start

    I have a float variable called birthdaytime in MyCharacter blueprint. I want this variable to be equal to the float called DayCycle in the Sky_Sphere blueprint. That way, if I decide to change how long the days last, it will automatically update the birthdaytime. I have used blueprint interfaces to set up my hud so I don't know why this is so problematic for me but I can't seem to figure it out. Can anyone give me a hand? Thanks

    #2
    Originally posted by kjsupe View Post
    I have a float variable called birthdaytime in MyCharacter blueprint. I want this variable to be equal to the float called DayCycle in the Sky_Sphere blueprint. That way, if I decide to change how long the days last, it will automatically update the birthdaytime. I have used blueprint interfaces to set up my hud so I don't know why this is so problematic for me but I can't seem to figure it out. Can anyone give me a hand? Thanks
    If it is by an interface you want to achieve this then
    1.Make a interface blueprint with a function that has a float variable as input
    2.Implement the interface on both blueprints and make sure that you have an "Actor" variable for you targetblueprint
    3.Set the Actor variable to public so that it may be accessed in the details panel of the level editor
    4.Drag both blueprints into the level
    5.In the level click the blueprint you want to send the float from and to the right you should see your actor targetblueprint variable, and be able to set that
    to the targetblueprint.
    6. Send the variable through the interface message and use the targetblueprint variable as the "target"
    7. In your targetblueprint you should be able to access this variable by right-clicking and adding "Event (interface function)"

    If I didn't explain it good enough let me know
    Kind Regards,
    Bonny

    Comment

    Working...
    X