Timeline within a Macro ?

is it somehow possible to add timelines to macros ?

No. Because Timelines are bound to the actor.

You can have the TimelineComponent as an input of the Macro, but you can only play/stop the Timeline then and can’t access any of the outputs.

What do you want to do? Maybe there’s another solution.

That´s a pitty. I have my whole project perfectly broken up into macros chunks to keep it as clear and easy to use as possible. Just two parts use timelines. The first one is a function to smooth teleport from one location to another with a single line trace (for VR). The second one is used as a scale curve for some sort of target object that appears where the trace hits the ground. The timeline curve keeps it roughly the same size in screenspace no matter how far the trace impact happens. For the second one I allready changed it to a curve variable that gets it´s float value from the distance vector. for the first one I probabely could do the same with a loop from 0-1. But I really think it´s a pitty this is not simply possible with a timeline. You say it doesn´t work because it´s bound to an actor ? Isn´t every variable within a macro bound to an actor ? So far I haven´t copied macros to actors. Usually I have a ready made character with macros and I rather copy the whole character. How do I actually copy a macro from one actor to another ? Just did a quick test and I only seem to be able to drag and drop it. After that it doesn´t appear as macro in the new actor. When I open it, it opens in the old actor.

Timelines are actually unique components. That’s why macroes and functions can’t have timelines within them since they can only contain non-unique stuff as they can be called more than once.

We can’t do time manipulation inside the function and macro. Bu if you tend to simpelifize the code (like refactoring) you can try collapsed node.

Thank you I´ll give this a try.

whoopsie daisy.
I thought you were talking about Macro Libraries. Sorry about that.
You can’t add Timelines in Macros because Macros are simply a feature to beautify the Graph. At compile Time, a Macros is expanded.
Let’s say your Macro looks like this:

and your setup looks like this:

After compiling/when running, the execution looks like this:

Now imagine you add a Timeline in a Macro.
You will have thousands of Timelines with this.

If I was you, I’d create a custom Event in your Actor.
This Custom Event plays your Timeline and updates your whatever you want.

It would be handy if macro’s would support timelines and custom ‘internal’ events for timers

The example where it expands doesn’t make it a reason it’s not possible, you just wouldn’t use macro’s with timelines in it in this way.

Why can’t the macro used in an actor add the timeline to the actor then?

You could have macro’s that you only use with actors, Maybe even have a setting that defines the class a macro can act in.

I use timelines for any property i want to animate in an actor, so i have lots of them

It’s a lot of copying around.

I’l try spawning an actor with the timeline in it and have it emit events to the spawning actor to update.

I could use timers too, but it’s a lot cleaner with timelines imho. But these can’t be used in macro’s either, at least not the events they are bound to.

A way to hide the events we need to link timers and dispatchers to would help too, like the public setting on variables.

Timelines and delays need to “read” the UWorld the Owner’s graph is connected to, otherwise they cannot execute.

“Macros” are collections of static functions and there’s no UWorld property attached to them, which means a Macro has no idea where to get a TimerManager from, so Macros by default cannot register any timer object to the TimerManager.
This is why you can’t add a “Timeline” node to a Macro…

That’s for the existing macro’s… Would it be possible to implement macro’s that do get acces to the uworld of the graph/object they are used in ?

For timelines they would also need to be able to add components then ?

I would love to have a timeline in custom macro libraries myself. I have what you would call universal actions along a spline that would work with many various actors. I have a bobbing up and down that would work with most insect actors and to have it where I can just macro the whole set of blueprints that set it up properly and turn it into a custom macro in a macro library would be really nice. I think of it as plugging in an AI cartridge of sorts. Hard to produce the same exact curves in every project. I know you can copy and paste but I mean say you have a project eons down the road you have to have the same exact behavior in. Would be easier to just have a macro library of these mindless AI cartridges or macros if you will. Same thing with get actor if class that would be handy to put in a macro as well. I use it so often but also often forget about the setup.