Download

Order / sequence of blueprint-execution

Hi,

sorry, if this has been answered before, but I didn’t find any answer.
In my current project I want to do the following:

  • There is a variable (a flag), which has to be set to a specified value as the very first action of each tick.
  • Then - within the same tick - some of the actors may change this variable in some way.
  • Finally at the end of each tick, an action shall be perfomed, depending on the variable.

I thought, level blueprint would be the first blueprint, which ‘onTick’-Event is being startet at each tick. But now I am not so sure anymore.
And I would love to get out of guessing and into knowing.

Can someone please tell me, if and how I can definitely start an action at the very beginning of each tick and a different action at the very end of each tick?
An answer would be highly appreciated.

Best regards
Christian

So, is it really impossible to set or influence the sequence, in which the blueprint-actors shall be executed?
I would be glad with something like “the blueprint are executed in alphabetical order” (which is not the case).
Or if there would be some kind of blueprint, which is being executed at the end of each tick, that would be great enough, too.

Best regards
Christian

Finally i found a way, but i don’t like it.

In case somebody has the same problem:
Now i have an event dispatcher in each BP, which has to be called in a definite point of the sequence.
And then I simply call this event dispatcher from the level-blueprint instead of using the tick event. That way I can define the order, that the BPs are called.
Drawback: In every map of my game, I have to paste that code into the level blueprint.

If someone has a better idea, it is very welcome.

Create a blueprint interface and have your level blueprints inherit the interface, this way you only need to code once.

Some documentation here. Implementing Blueprint Interfaces | Unreal Engine Documentation

Or even better put all that logic into blueprintable components, then add component to needed actors.