Hi folks,
So I've run into a bit of an issue where I thought this should be possible with Callable and anonymous functions, but I'm getting an unhelpful error message from the engine so I'm not sure what exactly the problem is.
The setup is basically this: when a boss is ready() I create a list of commands that are called in sequence. Basically a command pattern, and these command objects then apply whatever functionality they have to, return a timer, once that's done, onto the next. It works perfectly, but I need the ability to switch between these patterns based on certain conditions (e.g. a component has been destroyed), so I tried something like this:


Which in my mind, should work. But I'm getting the following error:

What am I missing here? I have an alternative I know will definitely work, but that would be much less flexible and I like this idea, so any help would be appreciated.