Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 returnFloat;
Product Version: Not Selected
more ▼

asked May 11 '15 at 02:55 AM in C++ Programming

avatar image

101 12 22 32

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi CrashAngel,

I was able to reproduce the crash using the blueprints/files your provided, but I cannot think of an immediate fix or work around for the issue. I have placed a bug report in our system for your crash however. For your reference, the bug number is UE-15512. I hope we can have this fixed for you as soon as possible and I thank you for working with me to reproduce the crash.

Have a nice day

Matthew Clark

more ▼

answered May 13 '15 at 02:18 PM

avatar image CrashAngel May 13 '15 at 04:18 PM

OK, Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi CrashAngel,

Using the return function most likely won't be what you need, as it will only return the float once the entire timeline has finished. If you would like to access one of the variables while the timeline is in use, then please try using a UPROPERTY for the float that is declared outside of the function, and set to BlueprintReadWrite, VisibleAnywhere or EditAnywhere so that it's possible to read it in a blueprint. You could then have it be checked using the OnTick event or something similar to have it constantly updating.

Hope this helps!

Have a nice day,

Matthew Clark

more ▼

answered May 11 '15 at 01:46 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I did as you said and seems to be working when I start the engine ...

But after about 30 seconds running visual studio just returning an error

alt text

Part My Code Below:

 void AVJTimeline::BeginPlay()
     bool StartConfig = false;
     bool xTimeLineUpdate = true;
     bool xTimeLineChange = false;
     TimeLine = *new FTimeline;
     TimerHandle = *new FTimerHandle;
     xEditCurve = *new FRichCurve;
     xCurveFloat = ConstructObject<UCurveFloat>(UCurveFloat::StaticClass());
     GetWorldTimerManager().SetTimer(TimerHandle, this, &AVJTimeline::TickTimeline, DeltaTime, true, 0.0f);
 void AVJTimeline::VJTimeLine_Execute(){
     if (StartConfig == false){ AVJTimeline::Timeline_Execute_Change(); StartConfig = true; }
     if (xTimeLineUpdate == true && xTimeLineChange == true){
         xTimeLineUpdate = true;
         FScriptDelegate FinishedEvent;
         FinishedEvent.BindUFunction(this, TEXT("Timeline_Execute_Change"));
 void AVJTimeline::Timeline_Execute_Change(){
     float xTimeLength = CalculateBPMSecondsToBeats(BPM, Beats);
     FOnTimelineFloat ProgressEvent{};
     KeyHandle = xEditCurve.AddKey(0.0f, 0.0f);
     KeyHandle = xEditCurve.AddKey((xTimeLength / 2), CalculateDegree(Degree), false, KeyHandle);
     KeyHandle = xEditCurve.AddKey(xTimeLength, 0.0f, false, KeyHandle);
     xEditCurve.SetKeyInterpMode(KeyHandle, Curve);
     xCurveFloat->FloatCurve = xEditCurve;
     ProgressEvent.BindUFunction(this, "TimeLine_Update");
     TimeLine.AddInterpFloat(xCurveFloat, ProgressEvent, FName{ TEXT("TimelineProgress") });
     xTimeLineUpdate = false;
     xTimeLineChange = false;
 void AVJTimeline::VJTimeLine_Update(float xValue){
     xTimeLineUpdate = true;
     if (xTimeLineChange == true){ xTimeLineChange = false; }
     else{ xTimeLineChange = true; }
 void AVJTimeline::TickTimeline(){
     if (TimeLine.IsPlaying()){
         if (xTimeLineUpdate == true){
             xTimeLineUpdate = false;
         GetWorldTimerManager().ClearTimer(this, &AVJTimeline::TickTimeline);

bug.png (42.2 kB)
more ▼

answered May 12 '15 at 06:06 PM

avatar image

101 12 22 32

avatar image Matthew J May 12 '15 at 06:14 PM

According to the error shown in the picture you provided, the issue lies elsewhere in the code. Could you provide me with all of your .cpp and .h files so that I can look at them and find where the issue is? It'll be easier to diagnose if I can put them into the compiler myself.


avatar image CrashAngel May 12 '15 at 06:38 PM

VJTimeline.h >> http://jpst.it/yQRR

VJTimeline.cpp >> http://jpst.it/yQR_

avatar image Matthew J May 12 '15 at 06:44 PM

The issue is still not contained in these lines of code. The line that the error in your picture is pointing to would be:

 TArray<FRichCurveEditInfoConst> Curves = GetCurves();

I need the file (CurveBase.cpp) that this line is in, as well as the file that declares/defines 'GetCurves();'. It would help if you were to provide me with all of the code files you are using for your project, so that I know what every function that is being called does.

Edit: Ah, this is a function that is part of the engine itself. I apologize. I'll be investigating this issue and I'll let you know as soon as I find the problem.

avatar image CrashAngel May 12 '15 at 06:58 PM

This file is the engine curvebase

C:\UnrealEngine\Engine\Source\Runtime\Engine\Private\CurveBase.cpp - Line 788


avatar image CrashAngel May 12 '15 at 06:59 PM

Ok, Thanks Man!


avatar image CrashAngel May 12 '15 at 07:13 PM

This is My Source / Content Project ->> BluePrint And Level..

In BluePrint I Set Keys 1,2,3,4 in Keyboard to Fire Events to Change Values to Test

link text

crashangelarts.zip (393.5 kB)
avatar image Matthew J May 12 '15 at 07:15 PM

What were you doing when the crash occurred and what had you changed in the code to be exact? Also what version of the editor are you using? Using your code, I am still unable to reproduce the crash, which is the first step to finding out what is wrong.

avatar image CrashAngel May 12 '15 at 07:53 PM

Im Using Version 4.7.3

I Start the Editor and Numbers begin to scroll across the screen as if the code was working .. after about 30 seconds I get the error Visual studio ...

I I did some tests here and when I change the variable xCurveFloat I'm building the curve to a variable that takes a type curve

 const ConstructorHelpers :: FObjectFinder <UCurveFloat> Curve (TEXT ("CurveFloat '/ Game / NewCurveBase' '));

some asset in the process engine also works but the error has the visual tudio not happen ...

I believe that should be the way of how I'm building the curve in the variable

 KeyHandle = xEditCurve.AddKey(0.0f, 0.0f);
      KeyHandle = xEditCurve.AddKey((xTimeLength / 2), CalculateDegree(Degree), false, KeyHandle);
      KeyHandle = xEditCurve.AddKey(xTimeLength, 0.0f, false, KeyHandle);
avatar image Matthew J May 12 '15 at 08:09 PM

The version could be causing the issue. I'm currently using 4.8.0 Preview 2 and I cannot get the crash using your code. Can you try updating to the new editor? Be sure to make a copy of your project if you do so, in case it causes more problems. Are you launching the editor through debug in Visual Studio? If so, please try running the Binary version and see if you still experience this crash.

avatar image CrashAngel May 12 '15 at 08:34 PM

OK I Get Your Version... Yes Launch Debug in Visual Studio...

I Trying Test and before i post results.. Thanks ...

avatar image CrashAngel May 13 '15 at 12:46 AM

Hi, Try This...

Create a New Project Name: CrashAngelArts

Open Project

File > Add Class To Project > Class Actor > Name: VJTimeline

Open VisualStudio and Replace VJTimeline.h / VJTimeline.cpp

Open Editor And Create New BluePrint Type: VJTimeline

ScreenShhot > ConstrucScript e EventGraph

alt text

My BluePrint And Files Attached in Version 4.8...

alt text

link text

bp.png (55.8 kB)
bp2.png (106.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question