Well, I don't know if I saw the correct part of the video but what you want to achieve is nothing trivial. One way would be by registering the inputs and the positions where you execute them in an array. Then the shadow reads that array and executes the movements with the desired time delay. For that the characters have to be, how to say, generalized, abstracted. The characters move because they receive a command to move. Then later in a general input function, you generate the commands, register them and send them to the characters, in this case they would also have to receive the position where the command was executed and/or by time.
There is a pattern called Command:
and pattern State:
This is all I can tell you based on what I saw in the video (The character chased by various shadows). Ask me if you want details about something specific or you can ask again in the forum to see if there is someone who can give you another answer.