Download

How Expose Float From My TimeLine C++ in BluePrint Tick, is possible?

Hi, I created a copy of the topic BindFunction Timeline and is working perfectly …

Now, I Create My TimeLine with dynamic curves and like to know how can I make my function to return the current value that is running in the Timeline for an output variable … Same as TimeLine in BluePrint …

This is my TimeLine Function…


float ATimeLineExecute::VJTimeLine_Execute()
 {
     TimeLine = FTimeline{};
 
     // Create Dynamic Custom Curve
     FRichCurve xEditCurve = *new FRichCurve;
     FKeyHandle KeyHandle = xEditCurve.AddKey(10.f, 1000.f);
     UCurveFloat* xCurveFloat = ConstructObject<UCurveFloat>(UCurveFloat::StaticClass());
     FOnTimelineFloat progressFunction{};
 
     xEditCurve.AddKey(0.0f, 0.0f, true, KeyHandle);
     xEditCurve.AddKey(5.f, 1000.f, false, KeyHandle);
     xEditCurve.AddKey(10.f, 10000.f, false, KeyHandle);
 
     xCurveFloat->FloatCurve = xEditCurve;
 
     // Bind Function
     progressFunction.BindUFunction(this, "EffectProgress");
 
     TimeLine.AddInterpFloat(xCurveFloat, progressFunction, FName{ TEXT("EFFECTFADE") });
 
     // ------------------------------------------------
     // How I Return Float in Execution???
     // ------------------------------------------------
     return xFloatVariable;
 }